mirror of
https://github.com/nextcloud/talk-android
synced 2025-02-01 20:22:03 +00:00
Fake that we’re still in a room when visiting conversation info
Signed-off-by: Mario Danic <mario@lovelyhq.com>
This commit is contained in:
parent
c25a8b0fed
commit
da779190ed
@ -173,6 +173,7 @@ public class ChatController extends BaseController implements MessagesListAdapte
|
||||
private static final byte CONTENT_TYPE_SYSTEM_MESSAGE = 1;
|
||||
|
||||
private boolean wasDetached;
|
||||
private boolean isStartingACall;
|
||||
|
||||
public ChatController(Bundle args) {
|
||||
super(args);
|
||||
@ -511,6 +512,8 @@ public class ChatController extends BaseController implements MessagesListAdapte
|
||||
joinRoomWithPassword();
|
||||
}
|
||||
}
|
||||
|
||||
isStartingACall = false;
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -519,7 +522,9 @@ public class ChatController extends BaseController implements MessagesListAdapte
|
||||
if (conversationUser.hasSpreedCapabilityWithName("no-ping")
|
||||
&& getActivity() != null && !getActivity().isChangingConfigurations()) {
|
||||
wasDetached = true;
|
||||
leaveRoom();
|
||||
if (!isStartingACall) {
|
||||
leaveRoom();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -1015,11 +1020,13 @@ public class ChatController extends BaseController implements MessagesListAdapte
|
||||
if (!isVoiceOnlyCall) {
|
||||
Intent videoCallIntent = getIntentForCall(false);
|
||||
if (videoCallIntent != null) {
|
||||
isStartingACall = true;
|
||||
startActivity(videoCallIntent);
|
||||
}
|
||||
} else {
|
||||
Intent voiceCallIntent = getIntentForCall(true);
|
||||
if (voiceCallIntent != null) {
|
||||
isStartingACall = true;
|
||||
startActivity(voiceCallIntent);
|
||||
}
|
||||
}
|
||||
|
@ -118,7 +118,7 @@ public class ConversationInfoController extends BaseController {
|
||||
private FlexibleAdapter<AbstractFlexibleItem> adapter;
|
||||
private List<AbstractFlexibleItem> recyclerViewItems = new ArrayList<>();
|
||||
|
||||
public ConversationInfoController(Bundle args) {
|
||||
ConversationInfoController(Bundle args) {
|
||||
super(args);
|
||||
setHasOptionsMenu(true);
|
||||
NextcloudTalkApplication.getSharedApplication().getComponentApplication().inject(this);
|
||||
@ -192,6 +192,8 @@ public class ConversationInfoController extends BaseController {
|
||||
userItem.setEnabled(!participant.getSessionId().equals("0"));
|
||||
if (!TextUtils.isEmpty(participant.getUserId()) && participant.getUserId().equals(conversationUser.getUserId())) {
|
||||
ownUserItem = userItem;
|
||||
userItem.getModel().setSessionId("-1");
|
||||
userItem.setEnabled(true);
|
||||
} else {
|
||||
recyclerViewItems.add(userItem);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user