mirror of
https://github.com/nextcloud/talk-android.git
synced 2024-11-27 08:05:29 +03:00
Partly fix rotation issues
Signed-off-by: Mario Danic <mario@lovelyhq.com>
This commit is contained in:
parent
7ff6fcd366
commit
d461afb25b
2 changed files with 20 additions and 18 deletions
|
@ -503,9 +503,9 @@ public class ChatController extends BaseController implements MessagesListAdapte
|
|||
new KeyboardUtils(getActivity(), getView(), false);
|
||||
}
|
||||
|
||||
if (inChat) {
|
||||
NotificationUtils.cancelExistingNotifications(getApplicationContext(), conversationUser);
|
||||
NotificationUtils.cancelExistingNotifications(getApplicationContext(), conversationUser);
|
||||
|
||||
if (inChat) {
|
||||
if (wasDetached & conversationUser.hasSpreedCapabilityWithName("no-ping")) {
|
||||
wasDetached = false;
|
||||
joinRoomWithPassword();
|
||||
|
@ -516,7 +516,8 @@ public class ChatController extends BaseController implements MessagesListAdapte
|
|||
@Override
|
||||
protected void onDetach(@NonNull View view) {
|
||||
super.onDetach(view);
|
||||
if (conversationUser.hasSpreedCapabilityWithName("no-ping")) {
|
||||
if (conversationUser.hasSpreedCapabilityWithName("no-ping")
|
||||
&& getActivity() != null && !getActivity().isChangingConfigurations()) {
|
||||
wasDetached = true;
|
||||
leaveRoom();
|
||||
}
|
||||
|
@ -538,7 +539,6 @@ public class ChatController extends BaseController implements MessagesListAdapte
|
|||
adapter = null;
|
||||
inChat = false;
|
||||
ApplicationWideCurrentRoomHolder.getInstance().clear();
|
||||
leaveRoom();
|
||||
}
|
||||
|
||||
private void dispose() {
|
||||
|
|
|
@ -200,7 +200,6 @@ public class ContactsController extends BaseController implements SearchView.OnQ
|
|||
|
||||
if (isNewConversationView) {
|
||||
toggleNewCallHeaderVisibility(!isPublicCall);
|
||||
|
||||
checkAndHandleDoneMenuItem();
|
||||
}
|
||||
|
||||
|
@ -608,18 +607,6 @@ public class ContactsController extends BaseController implements SearchView.OnQ
|
|||
if (swipeRefreshLayout != null) {
|
||||
swipeRefreshLayout.setRefreshing(false);
|
||||
}
|
||||
|
||||
progressBar.setVisibility(View.GONE);
|
||||
genericRvLayout.setVisibility(View.VISIBLE);
|
||||
if (isNewConversationView) {
|
||||
conversationPrivacyToogleLayout.setVisibility(View.VISIBLE);
|
||||
joinConversationViaLinkLayout.setVisibility(View.VISIBLE);
|
||||
}
|
||||
|
||||
if (isNewConversationView) {
|
||||
checkAndHandleDoneMenuItem();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -660,6 +647,7 @@ public class ContactsController extends BaseController implements SearchView.OnQ
|
|||
dispose(contactsQueryDisposable);
|
||||
alreadyFetching = false;
|
||||
|
||||
disengageProgressBar();
|
||||
}
|
||||
});
|
||||
|
||||
|
@ -686,6 +674,21 @@ public class ContactsController extends BaseController implements SearchView.OnQ
|
|||
return "";
|
||||
}
|
||||
});
|
||||
|
||||
disengageProgressBar();
|
||||
}
|
||||
|
||||
private void disengageProgressBar() {
|
||||
if (!alreadyFetching) {
|
||||
progressBar.setVisibility(View.GONE);
|
||||
genericRvLayout.setVisibility(View.VISIBLE);
|
||||
|
||||
if (isNewConversationView) {
|
||||
conversationPrivacyToogleLayout.setVisibility(View.VISIBLE);
|
||||
joinConversationViaLinkLayout.setVisibility(View.VISIBLE);
|
||||
checkAndHandleDoneMenuItem();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void dispose(@Nullable Disposable disposable) {
|
||||
|
@ -766,7 +769,6 @@ public class ContactsController extends BaseController implements SearchView.OnQ
|
|||
if (!doneMenuItem.isVisible()) {
|
||||
doneMenuItem.setVisible(true);
|
||||
}
|
||||
|
||||
} else {
|
||||
doneMenuItem.setVisible(false);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue