in search of why some game summaries never load: show a different

state string when the load has timed out.
This commit is contained in:
Eric House 2016-03-04 08:34:47 -08:00
parent 885b375a55
commit 4f3d620cd6
6 changed files with 290 additions and 285 deletions

View file

@ -27,3 +27,4 @@ in_arrow_active.png
in_arrow.png
out_arrow_active.png
out_arrow.png
notify.png

File diff suppressed because it is too large Load diff

View file

@ -2029,6 +2029,8 @@
<!-- -->
<string name="game_list_tmp">Building game summary…</string>
<string name="summary_busy">Summary unavailable</string>
<string name="connstat_net_noaddr">This networked game has no way
to connect and will never be playable.\n\n(It was probably created
from an invitation that didn\'t specify any way of connecting

View file

@ -1753,6 +1753,7 @@
<string name="board_menu_dict">Esworb tsildrow</string>
<!-- -->
<string name="game_list_tmp">Gnidliub emag yrammus…</string>
<string name="summary_busy">Yrammus elbaliavanu</string>
<string name="connstat_net_noaddr">Siht dekrowten emag sah on yaw
ot tcennoc dna lliw reven eb elbayalp.\n\ntI( saw ylbaborp detaerc
morf na noitativni taht ndid\'t yficeps yna yaw fo gnitcennoc

View file

@ -1753,6 +1753,7 @@
<string name="board_menu_dict">BROWSE WORDLIST</string>
<!-- -->
<string name="game_list_tmp">BUILDING GAME SUMMARY…</string>
<string name="summary_busy">SUMMARY UNAVAILABLE</string>
<string name="connstat_net_noaddr">THIS NETWORKED GAME HAS NO WAY
TO CONNECT AND WILL NEVER BE PLAYABLE.\n\n(IT WAS PROBABLY CREATED
FROM AN INVITATION THAT DIDN\'T SPECIFY ANY WAY OF CONNECTING

View file

@ -59,7 +59,7 @@ public class GameListItem extends LinearLayout
private View m_hideable;
private ImageView m_thumb;
private ExpiringTextView m_name;
private View m_viewUnloaded;
private TextView m_viewUnloaded;
private View m_viewLoaded;
private LinearLayout m_list;
private TextView m_state;
@ -129,13 +129,7 @@ public class GameListItem extends LinearLayout
// as we're back on the UI thread.
++m_loadingCount;
LoadItemTask task = new LoadItemTask();
if ( false && Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB ) {
// Actually run these in parallel if the OS supports it
task.executeOnExecutor( AsyncTask.THREAD_POOL_EXECUTOR );
} else {
task.execute();
}
new LoadItemTask().execute();
}
public void invalName()
@ -195,7 +189,7 @@ public class GameListItem extends LinearLayout
m_name = (ExpiringTextView)findViewById( R.id.game_name );
m_expandButton = (ImageButton)findViewById( R.id.expander );
m_expandButton.setOnClickListener( this );
m_viewUnloaded = findViewById( R.id.view_unloaded );
m_viewUnloaded = (TextView)findViewById( R.id.view_unloaded );
m_viewLoaded = findViewById( R.id.view_loaded );
m_list = (LinearLayout)findViewById( R.id.player_list );
m_state = (TextView)findViewById( R.id.state );
@ -371,6 +365,11 @@ public class GameListItem extends LinearLayout
setData( summary, expanded );
setLoaded( null != m_summary );
if ( null == summary ) {
m_viewUnloaded
.setText( LocUtils.getString( m_context,
R.string.summary_busy ) );
}
synchronized( s_invalRows ) {
s_invalRows.remove( m_rowid );
}