Browse Source

Fix #208

Signed-off-by: Mario Danic <mario@lovelyhq.com>
Mario Danic 6 years ago
parent
commit
95ef492454

+ 4 - 2
app/src/main/java/com/nextcloud/talk/controllers/ChatController.java

@@ -197,7 +197,9 @@ public class ChatController extends BaseController implements MessagesListAdapte
             credentials = ApiUtils.getCredentials(conversationUser.getUserId(), conversationUser.getToken());
         }
 
-        this.startCallFromNotification = args.getBoolean(BundleKeys.KEY_FROM_NOTIFICATION_START_CALL);
+        if (args.containsKey(BundleKeys.KEY_FROM_NOTIFICATION_START_CALL)) {
+            this.startCallFromNotification = args.getBoolean(BundleKeys.KEY_FROM_NOTIFICATION_START_CALL);
+        }
         this.voiceOnly = args.getBoolean(BundleKeys.KEY_CALL_VOICE_ONLY, false);
     }
 
@@ -382,7 +384,7 @@ public class ChatController extends BaseController implements MessagesListAdapte
         messageInputView.getButton().setContentDescription(getResources()
                 .getString(R.string.nc_description_send_message_button));
 
-        if (adapterWasNull && startCallFromNotification == null) {
+        if (adapterWasNull && TextUtils.isEmpty(conversationName) && startCallFromNotification == null) {
             getRoomInfo();
         } else {
             handleFromNotification();

+ 5 - 1
app/src/main/java/com/nextcloud/talk/controllers/bottomsheet/OperationsMenuController.java

@@ -522,7 +522,11 @@ public class OperationsMenuController extends BaseController {
                         });
             }
         } else {
-            showResultImage(true, false);
+            if (!currentUser.hasSpreedCapabilityWithName("chat-v2")) {
+                showResultImage(true, false);
+            } else {
+                initiateConversation(true, null);
+            }
         }
     }