mirror of
git://xwords.git.sourceforge.net/gitroot/xwords/xwords
synced 2025-01-09 05:24:44 +01:00
cleanup: chat delegate no longer "returns" a result
This commit is contained in:
parent
5b4e04bc5a
commit
c57b5a232f
3 changed files with 6 additions and 17 deletions
|
@ -702,15 +702,6 @@ public class BoardDelegate extends DelegateBase
|
||||||
if ( Activity.RESULT_CANCELED != resultCode ) {
|
if ( Activity.RESULT_CANCELED != resultCode ) {
|
||||||
InviteMeans missingMeans = null;
|
InviteMeans missingMeans = null;
|
||||||
switch ( requestCode ) {
|
switch ( requestCode ) {
|
||||||
case CHAT_REQUEST:
|
|
||||||
if ( BuildConstants.CHAT_SUPPORTED ) {
|
|
||||||
String msg = data.getStringExtra( INTENT_KEY_CHAT );
|
|
||||||
if ( null != msg && msg.length() > 0 ) {
|
|
||||||
m_pendingChats.add( msg );
|
|
||||||
trySendChats();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
case BT_INVITE_RESULT:
|
case BT_INVITE_RESULT:
|
||||||
missingMeans = InviteMeans.BLUETOOTH;
|
missingMeans = InviteMeans.BLUETOOTH;
|
||||||
break;
|
break;
|
||||||
|
@ -2334,8 +2325,8 @@ public class BoardDelegate extends DelegateBase
|
||||||
int curPlayer = XwJNI.board_getSelPlayer( m_jniGamePtr );
|
int curPlayer = XwJNI.board_getSelPlayer( m_jniGamePtr );
|
||||||
String[] names = m_gi.playerNames();
|
String[] names = m_gi.playerNames();
|
||||||
boolean[] locs = m_gi.playersLocal(); // to convert old histories
|
boolean[] locs = m_gi.playersLocal(); // to convert old histories
|
||||||
ChatDelegate.startForResult( getDelegator(), RequestCode.CHAT_REQUEST,
|
ChatDelegate.start( getDelegator(), m_rowid, curPlayer,
|
||||||
m_rowid, curPlayer, names, locs );
|
names, locs );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -252,10 +252,9 @@ public class ChatDelegate extends DelegateBase {
|
||||||
return handled;
|
return handled;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void startForResult( Delegator delegator,
|
public static void start( Delegator delegator,
|
||||||
RequestCode requestCode,
|
long rowID, int curPlayer,
|
||||||
long rowID, int curPlayer,
|
String[] names, boolean[] locs )
|
||||||
String[] names, boolean[] locs )
|
|
||||||
{
|
{
|
||||||
Assert.assertFalse( -1 == curPlayer );
|
Assert.assertFalse( -1 == curPlayer );
|
||||||
Bundle bundle = new Bundle();
|
Bundle bundle = new Bundle();
|
||||||
|
@ -270,7 +269,7 @@ public class ChatDelegate extends DelegateBase {
|
||||||
Activity activity = delegator.getActivity();
|
Activity activity = delegator.getActivity();
|
||||||
Intent intent = new Intent( activity, ChatActivity.class );
|
Intent intent = new Intent( activity, ChatActivity.class );
|
||||||
intent.putExtras( bundle );
|
intent.putExtras( bundle );
|
||||||
activity.startActivityForResult( intent, requestCode.ordinal() );
|
activity.startActivity( intent );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -25,7 +25,6 @@ public enum RequestCode {
|
||||||
__UNUSED,
|
__UNUSED,
|
||||||
|
|
||||||
// BoardDelegate
|
// BoardDelegate
|
||||||
CHAT_REQUEST,
|
|
||||||
BT_INVITE_RESULT,
|
BT_INVITE_RESULT,
|
||||||
SMS_INVITE_RESULT,
|
SMS_INVITE_RESULT,
|
||||||
RELAY_INVITE_RESULT,
|
RELAY_INVITE_RESULT,
|
||||||
|
|
Loading…
Reference in a new issue