From 76404258a383aad3b299507e5dc4b2cffdd0b75a Mon Sep 17 00:00:00 2001 From: Eric House Date: Sun, 10 Jul 2016 14:21:18 -0700 Subject: [PATCH] launch chat next to board. Works to send, but crash when opening the notification that results. --- .../XWords4/src/org/eehouse/android/xw4/ChatDelegate.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/xwords4/android/XWords4/src/org/eehouse/android/xw4/ChatDelegate.java b/xwords4/android/XWords4/src/org/eehouse/android/xw4/ChatDelegate.java index ed5a996fe..1d9dde73f 100644 --- a/xwords4/android/XWords4/src/org/eehouse/android/xw4/ChatDelegate.java +++ b/xwords4/android/XWords4/src/org/eehouse/android/xw4/ChatDelegate.java @@ -273,10 +273,10 @@ public class ChatDelegate extends DelegateBase { bundle.putStringArray( INTENT_KEY_NAMES, names ); bundle.putBooleanArray( INTENT_KEY_LOCS, locs ); - Activity activity = delegator.getActivity(); - if ( activity instanceof FragActivity ) { - FragActivity.addFragment( new ChatFrag(), bundle, delegator ); + if ( delegator.inDPMode() ) { + delegator.addFragment( new ChatFrag(), bundle ); } else { + Activity activity = delegator.getActivity(); Intent intent = new Intent( activity, ChatActivity.class ); intent.putExtras( bundle ); activity.startActivityForResult( intent, requestCode.ordinal() );