show explanatory text when there are no invitations

This commit is contained in:
Eric House 2016-01-25 07:29:26 -08:00
parent 3c92b8837a
commit 813d5c18b3
5 changed files with 37 additions and 25 deletions

View file

@ -4497,6 +4497,7 @@ XLATE-ME
you get this error message you get this error message
*/ */
public static final int no_games_to_refresh=0x7f050096; public static final int no_games_to_refresh=0x7f050096;
public static final int no_invites=0x7f05033b;
/** <string name="no_market">Google Play app not found</string> /** <string name="no_market">Google Play app not found</string>
*/ */
public static final int no_market=0x7f05027a; public static final int no_market=0x7f05027a;

View file

@ -2652,4 +2652,6 @@
<string name="not_again_dfltname_fmt">You are using the default <string name="not_again_dfltname_fmt">You are using the default
player name \"%1$s\". Would you like to personalize with your own player name \"%1$s\". Would you like to personalize with your own
name before you create this game?</string> name before you create this game?</string>
<string name="no_invites">This game has sent no invitations</string>
</resources> </resources>

View file

@ -2268,4 +2268,5 @@
<string name="not_again_dfltname_fmt">Uoy era gnisu eht tluafed <string name="not_again_dfltname_fmt">Uoy era gnisu eht tluafed
reyalp eman \"%1$s\". Dluow uoy ekil ot ezilanosrep htiw ruoy nwo reyalp eman \"%1$s\". Dluow uoy ekil ot ezilanosrep htiw ruoy nwo
eman erofeb uoy etaerc siht ?emag</string> eman erofeb uoy etaerc siht ?emag</string>
<string name="no_invites">Siht emag sah tnes on snoitativni</string>
</resources> </resources>

View file

@ -2268,4 +2268,5 @@
<string name="not_again_dfltname_fmt">YOU ARE USING THE DEFAULT <string name="not_again_dfltname_fmt">YOU ARE USING THE DEFAULT
PLAYER NAME \"%1$s\". WOULD YOU LIKE TO PERSONALIZE WITH YOUR OWN PLAYER NAME \"%1$s\". WOULD YOU LIKE TO PERSONALIZE WITH YOUR OWN
NAME BEFORE YOU CREATE THIS GAME?</string> NAME BEFORE YOU CREATE THIS GAME?</string>
<string name="no_invites">THIS GAME HAS SENT NO INVITATIONS</string>
</resources> </resources>

View file

@ -511,7 +511,11 @@ public class DBUtils {
public String getAsText( Context context ) public String getAsText( Context context )
{ {
String result;
int count = m_timestamps.size(); int count = m_timestamps.size();
if ( 0 == count ) {
result = LocUtils.getString( context, R.string.no_invites );
} else {
String[] strs = new String[count]; String[] strs = new String[count];
for ( int ii = 0; ii < count; ++ii ) { for ( int ii = 0; ii < count; ++ii ) {
InviteMeans means = m_means.get(ii); InviteMeans means = m_means.get(ii);
@ -540,8 +544,11 @@ public class DBUtils {
} }
strs[ii] = msg; strs[ii] = msg;
} }
return TextUtils.join( "\n\n", strs ); result = TextUtils.join( "\n\n", strs );
} }
return result;
}
} }
public static SentInvitesInfo getInvitesFor( Context context, long rowid ) public static SentInvitesInfo getInvitesFor( Context context, long rowid )