mirror of
https://github.com/nextcloud/talk-android
synced 2025-06-21 04:29:45 +01:00
Partly fix rotation issues
Signed-off-by: Mario Danic <mario@lovelyhq.com>
This commit is contained in:
parent
7ff6fcd366
commit
d461afb25b
@ -503,9 +503,9 @@ public class ChatController extends BaseController implements MessagesListAdapte
|
|||||||
new KeyboardUtils(getActivity(), getView(), false);
|
new KeyboardUtils(getActivity(), getView(), false);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (inChat) {
|
|
||||||
NotificationUtils.cancelExistingNotifications(getApplicationContext(), conversationUser);
|
NotificationUtils.cancelExistingNotifications(getApplicationContext(), conversationUser);
|
||||||
|
|
||||||
|
if (inChat) {
|
||||||
if (wasDetached & conversationUser.hasSpreedCapabilityWithName("no-ping")) {
|
if (wasDetached & conversationUser.hasSpreedCapabilityWithName("no-ping")) {
|
||||||
wasDetached = false;
|
wasDetached = false;
|
||||||
joinRoomWithPassword();
|
joinRoomWithPassword();
|
||||||
@ -516,7 +516,8 @@ public class ChatController extends BaseController implements MessagesListAdapte
|
|||||||
@Override
|
@Override
|
||||||
protected void onDetach(@NonNull View view) {
|
protected void onDetach(@NonNull View view) {
|
||||||
super.onDetach(view);
|
super.onDetach(view);
|
||||||
if (conversationUser.hasSpreedCapabilityWithName("no-ping")) {
|
if (conversationUser.hasSpreedCapabilityWithName("no-ping")
|
||||||
|
&& getActivity() != null && !getActivity().isChangingConfigurations()) {
|
||||||
wasDetached = true;
|
wasDetached = true;
|
||||||
leaveRoom();
|
leaveRoom();
|
||||||
}
|
}
|
||||||
@ -538,7 +539,6 @@ public class ChatController extends BaseController implements MessagesListAdapte
|
|||||||
adapter = null;
|
adapter = null;
|
||||||
inChat = false;
|
inChat = false;
|
||||||
ApplicationWideCurrentRoomHolder.getInstance().clear();
|
ApplicationWideCurrentRoomHolder.getInstance().clear();
|
||||||
leaveRoom();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void dispose() {
|
private void dispose() {
|
||||||
|
@ -200,7 +200,6 @@ public class ContactsController extends BaseController implements SearchView.OnQ
|
|||||||
|
|
||||||
if (isNewConversationView) {
|
if (isNewConversationView) {
|
||||||
toggleNewCallHeaderVisibility(!isPublicCall);
|
toggleNewCallHeaderVisibility(!isPublicCall);
|
||||||
|
|
||||||
checkAndHandleDoneMenuItem();
|
checkAndHandleDoneMenuItem();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -608,18 +607,6 @@ public class ContactsController extends BaseController implements SearchView.OnQ
|
|||||||
if (swipeRefreshLayout != null) {
|
if (swipeRefreshLayout != null) {
|
||||||
swipeRefreshLayout.setRefreshing(false);
|
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);
|
dispose(contactsQueryDisposable);
|
||||||
alreadyFetching = false;
|
alreadyFetching = false;
|
||||||
|
|
||||||
|
disengageProgressBar();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -686,6 +674,21 @@ public class ContactsController extends BaseController implements SearchView.OnQ
|
|||||||
return "";
|
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) {
|
private void dispose(@Nullable Disposable disposable) {
|
||||||
@ -766,7 +769,6 @@ public class ContactsController extends BaseController implements SearchView.OnQ
|
|||||||
if (!doneMenuItem.isVisible()) {
|
if (!doneMenuItem.isVisible()) {
|
||||||
doneMenuItem.setVisible(true);
|
doneMenuItem.setVisible(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
doneMenuItem.setVisible(false);
|
doneMenuItem.setVisible(false);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user