onResumed method
void
onResumed(
)
override
Implementation
@override
void onResumed() {
LogMessage.d("LifeCycle", "chat onResumed");
///when notification drawer was dragged then app goes inactive,when closes the drawer its trigger onResume
///so that this checking hasPaused added, this will invoke only when app is opened from background state.
if (hasPaused) {
hasPaused = false;
cancelNotification();
setChatStatus();
getAvailableFeatures();
//to avoid calling without initializedMessageList
if (initializedMessageList) {
/// we loading next messages instead of load message because the new messages received will be available in load next message
_loadNextMessages();
}
if (!KeyboardVisibilityController().isVisible) {
if (focusNode.hasFocus) {
focusNode.unfocus();
Future.delayed(const Duration(milliseconds: 100), () {
focusNode.requestFocus();
});
}
if (searchfocusNode.hasFocus) {
searchfocusNode.unfocus();
Future.delayed(const Duration(milliseconds: 100), () {
searchfocusNode.requestFocus();
});
}
}
setOnGoingUserAvail();
}
}