Эх сурвалжийг харах

Fix a crash with older Nc versions

Signed-off-by: Mario Danic <mario@lovelyhq.com>
Mario Danic 6 жил өмнө
parent
commit
7930c97dee

+ 8 - 1
app/src/main/java/com/nextcloud/talk/controllers/ContactsController.java

@@ -291,7 +291,14 @@ public class ContactsController extends BaseController implements SearchView.OnQ
                             } else {
                                 conversationIntent.putExtras(bundle);
                                 startActivity(conversationIntent);
-                                new Handler().postDelayed(() -> getRouter().popCurrentController(), 100);
+                                new Handler().postDelayed(new Runnable() {
+                                    @Override
+                                    public void run() {
+                                        if (!isDestroyed() && !isBeingDestroyed()) {
+                                            getRouter().popCurrentController();
+                                        }
+                                    }
+                                }, 100);
                             }
                         }