Added queet in TootActivity

This commit is contained in:
ivan agosto 2019-02-21 13:04:16 -06:00
parent 0d5223dff7
commit c24dd6ab06
2 changed files with 56 additions and 16 deletions

View File

@ -314,6 +314,9 @@ public class TootActivity extends BaseActivity implements OnPostActionInterface,
toot_emoji.setVisibility(View.GONE);
}
if(MainActivity.social == UpdateAccountInfoAsyncTask.SOCIAL.GNU ) {
toot_it.setText(getText(R.string.queet_it));
}
drawer_layout.getViewTreeObserver().addOnGlobalLayoutListener(new ViewTreeObserver.OnGlobalLayoutListener() {
@ -394,10 +397,19 @@ public class TootActivity extends BaseActivity implements OnPostActionInterface,
if( tootReply != null) {
tootReply();
}else {
if( title != null)
title.setText(getString(R.string.toot_title));
else
setTitle(R.string.toot_title);
if( title != null) {
if(MainActivity.social == UpdateAccountInfoAsyncTask.SOCIAL.GNU)
title.setText(getString(R.string.queet_title));
else
title.setText(getString(R.string.toot_title));
}
else {
if(MainActivity.social == UpdateAccountInfoAsyncTask.SOCIAL.GNU)
setTitle(R.string.queet_title);
else
setTitle(R.string.toot_title);
}
}
@ -2262,10 +2274,18 @@ public class TootActivity extends BaseActivity implements OnPostActionInterface,
tootReply();
}else {
if( title != null)
title.setText(getString(R.string.toot_title));
else
setTitle(R.string.toot_title);
if( title != null){
if(MainActivity.social == UpdateAccountInfoAsyncTask.SOCIAL.GNU)
title.setText(getString(R.string.queet_title));
else
title.setText(getString(R.string.toot_title));
}
else {
if (MainActivity.social == UpdateAccountInfoAsyncTask.SOCIAL.GNU)
setTitle(R.string.queet_title);
else
setTitle(R.string.toot_title);
}
}
invalidateOptionsMenu();
initialContent = toot_content.getText().toString();
@ -2397,10 +2417,18 @@ public class TootActivity extends BaseActivity implements OnPostActionInterface,
break;
}
if( title != null)
title.setText(getString(R.string.toot_title));
else
setTitle(R.string.toot_title);
if( title != null) {
if (MainActivity.social == UpdateAccountInfoAsyncTask.SOCIAL.GNU)
title.setText(getString(R.string.queet_title));
else
title.setText(getString(R.string.toot_title));
}
else {
if (MainActivity.social == UpdateAccountInfoAsyncTask.SOCIAL.GNU)
setTitle(R.string.queet_title);
else
setTitle(R.string.toot_title);
}
invalidateOptionsMenu();
initialContent = toot_content.getText().toString();
toot_space_left.setText(String.valueOf(toot_content.getText().length() + toot_cw_content.getText().length()));
@ -2408,10 +2436,18 @@ public class TootActivity extends BaseActivity implements OnPostActionInterface,
private void tootReply(){
SharedPreferences sharedpreferences = getSharedPreferences(Helper.APP_PREFS, android.content.Context.MODE_PRIVATE);
if( title != null)
title.setText(getString(R.string.toot_title_reply));
else
setTitle(R.string.toot_title_reply);
if( title != null) {
if (MainActivity.social == UpdateAccountInfoAsyncTask.SOCIAL.GNU)
title.setText(getString(R.string.queet_title_reply));
else
title.setText(getString(R.string.toot_title_reply));
}
else {
if (MainActivity.social == UpdateAccountInfoAsyncTask.SOCIAL.GNU)
setTitle(R.string.queet_title_reply);
else
setTitle(R.string.toot_title_reply);
}
String userIdReply;
if( accountReply == null)
userIdReply = sharedpreferences.getString(Helper.PREF_KEY_ID, null);

View File

@ -71,6 +71,7 @@
<string name="action_open_in_web">Open in browser</string>
<string name="translate">Translate</string>
<string name="please_wait">Please, wait few seconds before making this action.</string>
<string name="queets" translatable="false">Queets</string>
<!--- Menu -->
<string name="home_menu">Home</string>
<string name="local_menu">Local timeline</string>
@ -165,9 +166,12 @@
<string name="toot_cw_placeholder">Warning</string>
<string name="toot_placeholder">What is on your mind?</string>
<string name="toot_it">TOOT!</string>
<string name="queet_it">QUEET!</string>
<string name="cw">cw</string>
<string name="toot_title">Write a toot</string>
<string name="toot_title_reply">Reply to a toot</string>
<string name="queet_title">Write a queet</string>
<string name="queet_title_reply">Reply to a queet</string>
<string name="toot_no_space">You have reached the 500 characters allowed!</string>
<string name="toot_select_image">Select a media</string>
<string name="toot_select_image_error">An error occurred while selecting the media!</string>