mirror of
git://xwords.git.sourceforge.net/gitroot/xwords/xwords
synced 2025-01-22 07:28:16 +01:00
disable chat, and include reason in change log
This commit is contained in:
parent
04eeebc3a4
commit
5d7cc9e9e8
4 changed files with 41 additions and 23 deletions
|
@ -17,7 +17,6 @@ local_DEFINES += \
|
||||||
-DXWFEATURE_SMS \
|
-DXWFEATURE_SMS \
|
||||||
-DXWFEATURE_COMMSACK \
|
-DXWFEATURE_COMMSACK \
|
||||||
-DXWFEATURE_TURNCHANGENOTIFY \
|
-DXWFEATURE_TURNCHANGENOTIFY \
|
||||||
-DXWFEATURE_CHAT \
|
|
||||||
-DCOMMS_XPORT_FLAGSPROC \
|
-DCOMMS_XPORT_FLAGSPROC \
|
||||||
-DKEY_SUPPORT \
|
-DKEY_SUPPORT \
|
||||||
-DXWFEATURE_CROSSHAIRS \
|
-DXWFEATURE_CROSSHAIRS \
|
||||||
|
|
|
@ -10,6 +10,10 @@
|
||||||
<h3>New with this release</h3>
|
<h3>New with this release</h3>
|
||||||
<ul>
|
<ul>
|
||||||
<li>Fix menu missing on some tablets</li>
|
<li>Fix menu missing on some tablets</li>
|
||||||
|
|
||||||
|
<li>Disable in-game Chat feature. (It has bugs that cause games to
|
||||||
|
stop syncing moves. I&ll fix eventually. Let me know if you
|
||||||
|
use this feature and I&ll up the priority.)</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
<h3>Next up</h3>
|
<h3>Next up</h3>
|
||||||
|
|
|
@ -127,7 +127,7 @@ public class BoardActivity extends XWActivity
|
||||||
private Button m_exchCommmitButton;
|
private Button m_exchCommmitButton;
|
||||||
private Button m_exchCancelButton;
|
private Button m_exchCancelButton;
|
||||||
|
|
||||||
private ArrayList<String> m_pendingChats = new ArrayList<String>();
|
private ArrayList<String> m_pendingChats;
|
||||||
|
|
||||||
private String m_dlgBytes = null;
|
private String m_dlgBytes = null;
|
||||||
private EditText m_passwdEdit = null;
|
private EditText m_passwdEdit = null;
|
||||||
|
@ -512,6 +512,10 @@ public class BoardActivity extends XWActivity
|
||||||
requestWindowFeature( Window.FEATURE_NO_TITLE );
|
requestWindowFeature( Window.FEATURE_NO_TITLE );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ( XWApp.CHAT_SUPPORTED ) {
|
||||||
|
m_pendingChats = new ArrayList<String>();
|
||||||
|
}
|
||||||
|
|
||||||
m_utils = new BoardUtilCtxt();
|
m_utils = new BoardUtilCtxt();
|
||||||
m_jniu = JNIUtilsImpl.get( this );
|
m_jniu = JNIUtilsImpl.get( this );
|
||||||
setContentView( R.layout.board );
|
setContentView( R.layout.board );
|
||||||
|
@ -601,10 +605,12 @@ public class BoardActivity extends XWActivity
|
||||||
if ( Activity.RESULT_CANCELED != resultCode ) {
|
if ( Activity.RESULT_CANCELED != resultCode ) {
|
||||||
switch ( requestCode ) {
|
switch ( requestCode ) {
|
||||||
case CHAT_REQUEST:
|
case CHAT_REQUEST:
|
||||||
String msg = data.getStringExtra( INTENT_KEY_CHAT );
|
if ( XWApp.CHAT_SUPPORTED ) {
|
||||||
if ( null != msg && msg.length() > 0 ) {
|
String msg = data.getStringExtra( INTENT_KEY_CHAT );
|
||||||
m_pendingChats.add( msg );
|
if ( null != msg && msg.length() > 0 ) {
|
||||||
trySendChats();
|
m_pendingChats.add( msg );
|
||||||
|
trySendChats();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case BT_INVITE_RESULT:
|
case BT_INVITE_RESULT:
|
||||||
|
@ -1660,13 +1666,15 @@ public class BoardActivity extends XWActivity
|
||||||
@Override
|
@Override
|
||||||
public void showChat( final String msg )
|
public void showChat( final String msg )
|
||||||
{
|
{
|
||||||
post( new Runnable() {
|
if ( XWApp.CHAT_SUPPORTED ) {
|
||||||
public void run() {
|
post( new Runnable() {
|
||||||
DBUtils.appendChatHistory( BoardActivity.this,
|
public void run() {
|
||||||
m_rowid, msg, false );
|
DBUtils.appendChatHistory( BoardActivity.this,
|
||||||
startChatActivity();
|
m_rowid, msg, false );
|
||||||
}
|
startChatActivity();
|
||||||
} );
|
}
|
||||||
|
} );
|
||||||
|
}
|
||||||
}
|
}
|
||||||
} // class BoardUtilCtxt
|
} // class BoardUtilCtxt
|
||||||
|
|
||||||
|
@ -1846,10 +1854,12 @@ public class BoardActivity extends XWActivity
|
||||||
R.string.not_again_undo,
|
R.string.not_again_undo,
|
||||||
R.string.key_notagain_undo,
|
R.string.key_notagain_undo,
|
||||||
UNDO_ACTION );
|
UNDO_ACTION );
|
||||||
m_toolbar.setListener( Toolbar.BUTTON_CHAT,
|
if ( XWApp.CHAT_SUPPORTED ) {
|
||||||
R.string.not_again_chat,
|
m_toolbar.setListener( Toolbar.BUTTON_CHAT,
|
||||||
R.string.key_notagain_chat,
|
R.string.not_again_chat,
|
||||||
CHAT_ACTION );
|
R.string.key_notagain_chat,
|
||||||
|
CHAT_ACTION );
|
||||||
|
}
|
||||||
} // populateToolbar
|
} // populateToolbar
|
||||||
|
|
||||||
private OnDismissListener makeODLforBlocking( final int id )
|
private OnDismissListener makeODLforBlocking( final int id )
|
||||||
|
@ -1933,9 +1943,11 @@ public class BoardActivity extends XWActivity
|
||||||
|
|
||||||
private void startChatActivity()
|
private void startChatActivity()
|
||||||
{
|
{
|
||||||
Intent intent = new Intent( this, ChatActivity.class );
|
if ( XWApp.CHAT_SUPPORTED ) {
|
||||||
intent.putExtra( GameUtils.INTENT_KEY_ROWID, m_rowid );
|
Intent intent = new Intent( this, ChatActivity.class );
|
||||||
startActivityForResult( intent, CHAT_REQUEST );
|
intent.putExtra( GameUtils.INTENT_KEY_ROWID, m_rowid );
|
||||||
|
startActivityForResult( intent, CHAT_REQUEST );
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void waitCloseGame( boolean save )
|
private void waitCloseGame( boolean save )
|
||||||
|
@ -1979,7 +1991,7 @@ public class BoardActivity extends XWActivity
|
||||||
|
|
||||||
private void trySendChats()
|
private void trySendChats()
|
||||||
{
|
{
|
||||||
if ( null != m_jniThread ) {
|
if ( XWApp.CHAT_SUPPORTED && null != m_jniThread ) {
|
||||||
Iterator<String> iter = m_pendingChats.iterator();
|
Iterator<String> iter = m_pendingChats.iterator();
|
||||||
while ( iter.hasNext() ) {
|
while ( iter.hasNext() ) {
|
||||||
m_jniThread.handle( JNICmd.CMD_SENDCHAT, iter.next() );
|
m_jniThread.handle( JNICmd.CMD_SENDCHAT, iter.next() );
|
||||||
|
@ -2026,7 +2038,8 @@ public class BoardActivity extends XWActivity
|
||||||
m_toolbar.update( Toolbar.BUTTON_UNDO, m_gsi.canRedo );
|
m_toolbar.update( Toolbar.BUTTON_UNDO, m_gsi.canRedo );
|
||||||
m_toolbar.update( Toolbar.BUTTON_HINT_PREV, m_gsi.canHint );
|
m_toolbar.update( Toolbar.BUTTON_HINT_PREV, m_gsi.canHint );
|
||||||
m_toolbar.update( Toolbar.BUTTON_HINT_NEXT, m_gsi.canHint );
|
m_toolbar.update( Toolbar.BUTTON_HINT_NEXT, m_gsi.canHint );
|
||||||
m_toolbar.update( Toolbar.BUTTON_CHAT, m_gsi.gameIsConnected );
|
m_toolbar.update( Toolbar.BUTTON_CHAT,
|
||||||
|
XWApp.CHAT_SUPPORTED && m_gsi.gameIsConnected );
|
||||||
m_toolbar.update( Toolbar.BUTTON_BROWSE_DICT,
|
m_toolbar.update( Toolbar.BUTTON_BROWSE_DICT,
|
||||||
null != m_gi.dictName( m_view.getCurPlayer() ) );
|
null != m_gi.dictName( m_view.getCurPlayer() ) );
|
||||||
}
|
}
|
||||||
|
@ -2048,7 +2061,8 @@ public class BoardActivity extends XWActivity
|
||||||
hideShowItem( menu, R.id.board_menu_undo_current, m_gsi.canRedo );
|
hideShowItem( menu, R.id.board_menu_undo_current, m_gsi.canRedo );
|
||||||
hideShowItem( menu, R.id.board_menu_hint_prev, m_gsi.canHint );
|
hideShowItem( menu, R.id.board_menu_hint_prev, m_gsi.canHint );
|
||||||
hideShowItem( menu, R.id.board_menu_hint_next, m_gsi.canHint );
|
hideShowItem( menu, R.id.board_menu_hint_next, m_gsi.canHint );
|
||||||
hideShowItem( menu, R.id.board_menu_chat, m_gsi.gameIsConnected );
|
hideShowItem( menu, R.id.board_menu_chat,
|
||||||
|
XWApp.CHAT_SUPPORTED && m_gsi.gameIsConnected );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -31,6 +31,7 @@ public class XWApp extends Application {
|
||||||
public static final boolean BTSUPPORTED = false;
|
public static final boolean BTSUPPORTED = false;
|
||||||
public static final boolean SMSSUPPORTED = true;
|
public static final boolean SMSSUPPORTED = true;
|
||||||
public static final boolean GCMSUPPORTED = true;
|
public static final boolean GCMSUPPORTED = true;
|
||||||
|
public static final boolean CHAT_SUPPORTED = false;
|
||||||
public static final boolean ATTACH_SUPPORTED = true;
|
public static final boolean ATTACH_SUPPORTED = true;
|
||||||
public static final boolean REMATCH_SUPPORTED = false;
|
public static final boolean REMATCH_SUPPORTED = false;
|
||||||
public static final boolean DEBUG = false;
|
public static final boolean DEBUG = false;
|
||||||
|
|
Loading…
Reference in a new issue