Remove some features
This commit is contained in:
parent
3827b0d63e
commit
2b2402e5e1
|
@ -226,8 +226,6 @@ public class AboutActivity extends BaseActivity implements OnRetrieveRemoteAccou
|
||||||
public void onRetrieveRemoteAccount(Results results) {
|
public void onRetrieveRemoteAccount(Results results) {
|
||||||
SharedPreferences sharedpreferences = getSharedPreferences(Helper.APP_PREFS, android.content.Context.MODE_PRIVATE);
|
SharedPreferences sharedpreferences = getSharedPreferences(Helper.APP_PREFS, android.content.Context.MODE_PRIVATE);
|
||||||
if( results == null){
|
if( results == null){
|
||||||
boolean show_error_messages = sharedpreferences.getBoolean(Helper.SET_SHOW_ERROR_MESSAGES, true);
|
|
||||||
if( show_error_messages)
|
|
||||||
Toast.makeText(getApplicationContext(), R.string.toast_error,Toast.LENGTH_LONG).show();
|
Toast.makeText(getApplicationContext(), R.string.toast_error,Toast.LENGTH_LONG).show();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
|
@ -201,9 +201,6 @@ public class HashTagActivity extends BaseActivity implements OnRetrieveFeedsInte
|
||||||
mainLoader.setVisibility(View.GONE);
|
mainLoader.setVisibility(View.GONE);
|
||||||
nextElementLoader.setVisibility(View.GONE);
|
nextElementLoader.setVisibility(View.GONE);
|
||||||
if( apiResponse.getError() != null){
|
if( apiResponse.getError() != null){
|
||||||
final SharedPreferences sharedpreferences = getSharedPreferences(Helper.APP_PREFS, Context.MODE_PRIVATE);
|
|
||||||
boolean show_error_messages = sharedpreferences.getBoolean(Helper.SET_SHOW_ERROR_MESSAGES, true);
|
|
||||||
if( show_error_messages)
|
|
||||||
Toast.makeText(getApplicationContext(), apiResponse.getError().getError(),Toast.LENGTH_LONG).show();
|
Toast.makeText(getApplicationContext(), apiResponse.getError().getError(),Toast.LENGTH_LONG).show();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
|
@ -266,8 +266,7 @@ public class ListActivity extends BaseActivity implements OnListActionInterface
|
||||||
nextElementLoader.setVisibility(View.GONE);
|
nextElementLoader.setVisibility(View.GONE);
|
||||||
//Discards 404 - error which can often happen due to toots which have been deleted
|
//Discards 404 - error which can often happen due to toots which have been deleted
|
||||||
if (apiResponse.getError() != null) {
|
if (apiResponse.getError() != null) {
|
||||||
boolean show_error_messages = sharedpreferences.getBoolean(Helper.SET_SHOW_ERROR_MESSAGES, true);
|
if ( !apiResponse.getError().getError().startsWith("404 -"))
|
||||||
if (show_error_messages && !apiResponse.getError().getError().startsWith("404 -"))
|
|
||||||
Toast.makeText(ListActivity.this, apiResponse.getError().getError(), Toast.LENGTH_LONG).show();
|
Toast.makeText(ListActivity.this, apiResponse.getError().getError(), Toast.LENGTH_LONG).show();
|
||||||
swipeRefreshLayout.setRefreshing(false);
|
swipeRefreshLayout.setRefreshing(false);
|
||||||
swiped = false;
|
swiped = false;
|
||||||
|
|
|
@ -182,9 +182,6 @@ public class ManageAccountsInListActivity extends BaseActivity implements OnList
|
||||||
loader.setVisibility(View.GONE);
|
loader.setVisibility(View.GONE);
|
||||||
main_account_container.setVisibility(View.VISIBLE);
|
main_account_container.setVisibility(View.VISIBLE);
|
||||||
if( apiResponse.getError() != null){
|
if( apiResponse.getError() != null){
|
||||||
final SharedPreferences sharedpreferences = getSharedPreferences(Helper.APP_PREFS, Context.MODE_PRIVATE);
|
|
||||||
boolean show_error_messages = sharedpreferences.getBoolean(Helper.SET_SHOW_ERROR_MESSAGES, true);
|
|
||||||
if( show_error_messages)
|
|
||||||
Toast.makeText(ManageAccountsInListActivity.this, apiResponse.getError().getError(),Toast.LENGTH_LONG).show();
|
Toast.makeText(ManageAccountsInListActivity.this, apiResponse.getError().getError(),Toast.LENGTH_LONG).show();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
|
@ -431,8 +431,6 @@ public class OwnerStatusActivity extends BaseActivity implements OnRetrieveFeeds
|
||||||
nextElementLoader.setVisibility(View.GONE);
|
nextElementLoader.setVisibility(View.GONE);
|
||||||
//Discards 404 - error which can often happen due to toots which have been deleted
|
//Discards 404 - error which can often happen due to toots which have been deleted
|
||||||
if( apiResponse.getError() != null && apiResponse.getError().getStatusCode() != 404 ){
|
if( apiResponse.getError() != null && apiResponse.getError().getStatusCode() != 404 ){
|
||||||
boolean show_error_messages = sharedpreferences.getBoolean(Helper.SET_SHOW_ERROR_MESSAGES, true);
|
|
||||||
if( show_error_messages )
|
|
||||||
Toast.makeText(OwnerStatusActivity.this, apiResponse.getError().getError(),Toast.LENGTH_LONG).show();
|
Toast.makeText(OwnerStatusActivity.this, apiResponse.getError().getError(),Toast.LENGTH_LONG).show();
|
||||||
swipeRefreshLayout.setRefreshing(false);
|
swipeRefreshLayout.setRefreshing(false);
|
||||||
swiped = false;
|
swiped = false;
|
||||||
|
|
|
@ -121,8 +121,6 @@ public class PartnerShipActivity extends BaseActivity implements OnRetrieveRemot
|
||||||
public void onRetrieveRemoteAccount(Results results) {
|
public void onRetrieveRemoteAccount(Results results) {
|
||||||
SharedPreferences sharedpreferences = getSharedPreferences(Helper.APP_PREFS, android.content.Context.MODE_PRIVATE);
|
SharedPreferences sharedpreferences = getSharedPreferences(Helper.APP_PREFS, android.content.Context.MODE_PRIVATE);
|
||||||
if( results == null){
|
if( results == null){
|
||||||
boolean show_error_messages = sharedpreferences.getBoolean(Helper.SET_SHOW_ERROR_MESSAGES, true);
|
|
||||||
if( show_error_messages)
|
|
||||||
Toast.makeText(getApplicationContext(), R.string.toast_error,Toast.LENGTH_LONG).show();
|
Toast.makeText(getApplicationContext(), R.string.toast_error,Toast.LENGTH_LONG).show();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
|
@ -273,8 +273,6 @@ public class RemoteFollowActivity extends BaseActivity implements OnRetrieveRemo
|
||||||
rf_search.setEnabled(true);
|
rf_search.setEnabled(true);
|
||||||
SharedPreferences sharedpreferences = getSharedPreferences(Helper.APP_PREFS, android.content.Context.MODE_PRIVATE);
|
SharedPreferences sharedpreferences = getSharedPreferences(Helper.APP_PREFS, android.content.Context.MODE_PRIVATE);
|
||||||
if( results == null){
|
if( results == null){
|
||||||
boolean show_error_messages = sharedpreferences.getBoolean(Helper.SET_SHOW_ERROR_MESSAGES, true);
|
|
||||||
if( show_error_messages)
|
|
||||||
Toast.makeText(getApplicationContext(), R.string.toast_error,Toast.LENGTH_LONG).show();
|
Toast.makeText(getApplicationContext(), R.string.toast_error,Toast.LENGTH_LONG).show();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -295,9 +293,8 @@ public class RemoteFollowActivity extends BaseActivity implements OnRetrieveRemo
|
||||||
public void onRetrieveRelationship(Relationship relationship, Error error) {
|
public void onRetrieveRelationship(Relationship relationship, Error error) {
|
||||||
final SharedPreferences sharedpreferences = getSharedPreferences(Helper.APP_PREFS, Context.MODE_PRIVATE);
|
final SharedPreferences sharedpreferences = getSharedPreferences(Helper.APP_PREFS, Context.MODE_PRIVATE);
|
||||||
if( error != null){
|
if( error != null){
|
||||||
boolean show_error_messages = sharedpreferences.getBoolean(Helper.SET_SHOW_ERROR_MESSAGES, true);
|
|
||||||
if( show_error_messages)
|
|
||||||
Toast.makeText(getApplicationContext(), error.getError(),Toast.LENGTH_LONG).show();
|
Toast.makeText(getApplicationContext(), error.getError(),Toast.LENGTH_LONG).show();
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if( relationship == null)
|
if( relationship == null)
|
||||||
|
@ -351,9 +348,8 @@ public class RemoteFollowActivity extends BaseActivity implements OnRetrieveRemo
|
||||||
public void onPostAction(int statusCode, API.StatusAction statusAction, String userId, Error error) {
|
public void onPostAction(int statusCode, API.StatusAction statusAction, String userId, Error error) {
|
||||||
if( error != null){
|
if( error != null){
|
||||||
final SharedPreferences sharedpreferences = getSharedPreferences(Helper.APP_PREFS, Context.MODE_PRIVATE);
|
final SharedPreferences sharedpreferences = getSharedPreferences(Helper.APP_PREFS, Context.MODE_PRIVATE);
|
||||||
boolean show_error_messages = sharedpreferences.getBoolean(Helper.SET_SHOW_ERROR_MESSAGES, true);
|
|
||||||
if( show_error_messages)
|
|
||||||
Toast.makeText(getApplicationContext(), error.getError(),Toast.LENGTH_LONG).show();
|
Toast.makeText(getApplicationContext(), error.getError(),Toast.LENGTH_LONG).show();
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
Helper.manageMessageStatusCode(getApplicationContext(), statusCode, statusAction);
|
Helper.manageMessageStatusCode(getApplicationContext(), statusCode, statusAction);
|
||||||
|
|
|
@ -112,9 +112,6 @@ public class SearchResultActivity extends BaseActivity implements OnRetrieveSear
|
||||||
public void onRetrieveSearch(Results results, Error error) {
|
public void onRetrieveSearch(Results results, Error error) {
|
||||||
loader.setVisibility(View.GONE);
|
loader.setVisibility(View.GONE);
|
||||||
if( error != null){
|
if( error != null){
|
||||||
final SharedPreferences sharedpreferences = getSharedPreferences(Helper.APP_PREFS, Context.MODE_PRIVATE);
|
|
||||||
boolean show_error_messages = sharedpreferences.getBoolean(Helper.SET_SHOW_ERROR_MESSAGES, true);
|
|
||||||
if( show_error_messages)
|
|
||||||
Toast.makeText(getApplicationContext(), error.getError(),Toast.LENGTH_LONG).show();
|
Toast.makeText(getApplicationContext(), error.getError(),Toast.LENGTH_LONG).show();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -139,9 +136,6 @@ public class SearchResultActivity extends BaseActivity implements OnRetrieveSear
|
||||||
public void onRetrieveSearchStatus(APIResponse apiResponse, Error error) {
|
public void onRetrieveSearchStatus(APIResponse apiResponse, Error error) {
|
||||||
loader.setVisibility(View.GONE);
|
loader.setVisibility(View.GONE);
|
||||||
if( apiResponse.getError() != null){
|
if( apiResponse.getError() != null){
|
||||||
final SharedPreferences sharedpreferences = getSharedPreferences(Helper.APP_PREFS, Context.MODE_PRIVATE);
|
|
||||||
boolean show_error_messages = sharedpreferences.getBoolean(Helper.SET_SHOW_ERROR_MESSAGES, true);
|
|
||||||
if( show_error_messages)
|
|
||||||
Toast.makeText(getApplicationContext(), error.getError(),Toast.LENGTH_LONG).show();
|
Toast.makeText(getApplicationContext(), error.getError(),Toast.LENGTH_LONG).show();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
|
@ -468,9 +468,6 @@ public class ShowAccountActivity extends BaseActivity implements OnPostActionInt
|
||||||
@Override
|
@Override
|
||||||
public void onPostAction(int statusCode,API.StatusAction statusAction, String targetedId, Error error) {
|
public void onPostAction(int statusCode,API.StatusAction statusAction, String targetedId, Error error) {
|
||||||
if( error != null){
|
if( error != null){
|
||||||
final SharedPreferences sharedpreferences = getSharedPreferences(Helper.APP_PREFS, Context.MODE_PRIVATE);
|
|
||||||
boolean show_error_messages = sharedpreferences.getBoolean(Helper.SET_SHOW_ERROR_MESSAGES, true);
|
|
||||||
if( show_error_messages)
|
|
||||||
Toast.makeText(getApplicationContext(), error.getError(),Toast.LENGTH_LONG).show();
|
Toast.makeText(getApplicationContext(), error.getError(),Toast.LENGTH_LONG).show();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -483,9 +480,6 @@ public class ShowAccountActivity extends BaseActivity implements OnPostActionInt
|
||||||
@Override
|
@Override
|
||||||
public void onRetrieveAccount(final Account account, Error error) {
|
public void onRetrieveAccount(final Account account, Error error) {
|
||||||
if( error != null || account.getAcct() == null){
|
if( error != null || account.getAcct() == null){
|
||||||
final SharedPreferences sharedpreferences = getSharedPreferences(Helper.APP_PREFS, Context.MODE_PRIVATE);
|
|
||||||
boolean show_error_messages = sharedpreferences.getBoolean(Helper.SET_SHOW_ERROR_MESSAGES, true);
|
|
||||||
if( show_error_messages && error != null)
|
|
||||||
Toast.makeText(getApplicationContext(), error.getError(),Toast.LENGTH_LONG).show();
|
Toast.makeText(getApplicationContext(), error.getError(),Toast.LENGTH_LONG).show();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -898,9 +892,6 @@ public class ShowAccountActivity extends BaseActivity implements OnPostActionInt
|
||||||
@Override
|
@Override
|
||||||
public void onRetrieveFeeds(APIResponse apiResponse) {
|
public void onRetrieveFeeds(APIResponse apiResponse) {
|
||||||
if( apiResponse.getError() != null){
|
if( apiResponse.getError() != null){
|
||||||
final SharedPreferences sharedpreferences = getApplicationContext().getSharedPreferences(Helper.APP_PREFS, android.content.Context.MODE_PRIVATE);
|
|
||||||
boolean show_error_messages = sharedpreferences.getBoolean(Helper.SET_SHOW_ERROR_MESSAGES, true);
|
|
||||||
if( show_error_messages)
|
|
||||||
Toast.makeText(getApplicationContext(), apiResponse.getError().getError(),Toast.LENGTH_LONG).show();
|
Toast.makeText(getApplicationContext(), apiResponse.getError().getError(),Toast.LENGTH_LONG).show();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -921,9 +912,6 @@ public class ShowAccountActivity extends BaseActivity implements OnPostActionInt
|
||||||
public void onRetrieveRelationship(Relationship relationship, Error error) {
|
public void onRetrieveRelationship(Relationship relationship, Error error) {
|
||||||
|
|
||||||
if( error != null){
|
if( error != null){
|
||||||
final SharedPreferences sharedpreferences = getSharedPreferences(Helper.APP_PREFS, Context.MODE_PRIVATE);
|
|
||||||
boolean show_error_messages = sharedpreferences.getBoolean(Helper.SET_SHOW_ERROR_MESSAGES, true);
|
|
||||||
if( show_error_messages)
|
|
||||||
Toast.makeText(getApplicationContext(), error.getError(),Toast.LENGTH_LONG).show();
|
Toast.makeText(getApplicationContext(), error.getError(),Toast.LENGTH_LONG).show();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
|
@ -270,9 +270,6 @@ public class ShowConversationActivity extends BaseActivity implements OnRetrieve
|
||||||
@Override
|
@Override
|
||||||
public void onRetrieveFeeds(APIResponse apiResponse) {
|
public void onRetrieveFeeds(APIResponse apiResponse) {
|
||||||
if( apiResponse.getError() != null){
|
if( apiResponse.getError() != null){
|
||||||
final SharedPreferences sharedpreferences = getSharedPreferences(Helper.APP_PREFS, android.content.Context.MODE_PRIVATE);
|
|
||||||
boolean show_error_messages = sharedpreferences.getBoolean(Helper.SET_SHOW_ERROR_MESSAGES, true);
|
|
||||||
if( show_error_messages)
|
|
||||||
Toast.makeText(getApplicationContext(), apiResponse.getError().getError(),Toast.LENGTH_LONG).show();
|
Toast.makeText(getApplicationContext(), apiResponse.getError().getError(),Toast.LENGTH_LONG).show();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -288,9 +285,6 @@ public class ShowConversationActivity extends BaseActivity implements OnRetrieve
|
||||||
swipeRefreshLayout.setRefreshing(false);
|
swipeRefreshLayout.setRefreshing(false);
|
||||||
RelativeLayout loader = findViewById(R.id.loader);
|
RelativeLayout loader = findViewById(R.id.loader);
|
||||||
if( error != null){
|
if( error != null){
|
||||||
final SharedPreferences sharedpreferences = getSharedPreferences(Helper.APP_PREFS, android.content.Context.MODE_PRIVATE);
|
|
||||||
boolean show_error_messages = sharedpreferences.getBoolean(Helper.SET_SHOW_ERROR_MESSAGES, true);
|
|
||||||
if( show_error_messages)
|
|
||||||
Toast.makeText(getApplicationContext(), error.getError(),Toast.LENGTH_LONG).show();
|
Toast.makeText(getApplicationContext(), error.getError(),Toast.LENGTH_LONG).show();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1312,14 +1312,10 @@ public class TootActivity extends BaseActivity implements OnRetrieveSearcAccount
|
||||||
@Override
|
@Override
|
||||||
public void onRetrieveAttachment(final Attachment attachment, Error error) {
|
public void onRetrieveAttachment(final Attachment attachment, Error error) {
|
||||||
if( error != null || attachment == null){
|
if( error != null || attachment == null){
|
||||||
final SharedPreferences sharedpreferences = getSharedPreferences(Helper.APP_PREFS, Context.MODE_PRIVATE);
|
|
||||||
boolean show_error_messages = sharedpreferences.getBoolean(Helper.SET_SHOW_ERROR_MESSAGES, true);
|
|
||||||
if( show_error_messages) {
|
|
||||||
if( error != null)
|
if( error != null)
|
||||||
Toast.makeText(getApplicationContext(), error.getError(), Toast.LENGTH_LONG).show();
|
Toast.makeText(getApplicationContext(), error.getError(), Toast.LENGTH_LONG).show();
|
||||||
else
|
else
|
||||||
Toast.makeText(getApplicationContext(), R.string.toast_error, Toast.LENGTH_LONG).show();
|
Toast.makeText(getApplicationContext(), R.string.toast_error, Toast.LENGTH_LONG).show();
|
||||||
}
|
|
||||||
if( attachments.size() == 0 )
|
if( attachments.size() == 0 )
|
||||||
toot_picture_container.setVisibility(View.GONE);
|
toot_picture_container.setVisibility(View.GONE);
|
||||||
toot_picture.setEnabled(true);
|
toot_picture.setEnabled(true);
|
||||||
|
@ -1359,7 +1355,7 @@ public class TootActivity extends BaseActivity implements OnRetrieveSearcAccount
|
||||||
imageView.setAdjustViewBounds(true);
|
imageView.setAdjustViewBounds(true);
|
||||||
imageView.setScaleType(ImageView.ScaleType.FIT_XY);
|
imageView.setScaleType(ImageView.ScaleType.FIT_XY);
|
||||||
final SharedPreferences sharedpreferences = getSharedPreferences(Helper.APP_PREFS, Context.MODE_PRIVATE);
|
final SharedPreferences sharedpreferences = getSharedPreferences(Helper.APP_PREFS, Context.MODE_PRIVATE);
|
||||||
boolean show_media_urls = sharedpreferences.getBoolean(Helper.SET_MEDIA_URLS, true);
|
boolean show_media_urls = sharedpreferences.getBoolean(Helper.SET_MEDIA_URLS, false);
|
||||||
if (show_media_urls) {
|
if (show_media_urls) {
|
||||||
//Adds the shorter text_url of attachment at the end of the toot
|
//Adds the shorter text_url of attachment at the end of the toot
|
||||||
int selectionBefore = toot_content.getSelectionStart();
|
int selectionBefore = toot_content.getSelectionStart();
|
||||||
|
@ -1509,7 +1505,7 @@ public class TootActivity extends BaseActivity implements OnRetrieveSearcAccount
|
||||||
if( Integer.valueOf(attachment.getId()) == viewId){
|
if( Integer.valueOf(attachment.getId()) == viewId){
|
||||||
attachments.remove(attachment);
|
attachments.remove(attachment);
|
||||||
final SharedPreferences sharedpreferences = getSharedPreferences(Helper.APP_PREFS, Context.MODE_PRIVATE);
|
final SharedPreferences sharedpreferences = getSharedPreferences(Helper.APP_PREFS, Context.MODE_PRIVATE);
|
||||||
boolean show_media_urls = sharedpreferences.getBoolean(Helper.SET_MEDIA_URLS, true);
|
boolean show_media_urls = sharedpreferences.getBoolean(Helper.SET_MEDIA_URLS, false);
|
||||||
if( show_media_urls) {
|
if( show_media_urls) {
|
||||||
//Clears the text_url at the end of the toot
for this attachment
|
//Clears the text_url at the end of the toot
for this attachment
|
||||||
int selectionBefore = toot_content.getSelectionStart();
|
int selectionBefore = toot_content.getSelectionStart();
|
||||||
|
|
|
@ -157,9 +157,6 @@ public class AccountSearchDevAdapter extends BaseAdapter implements OnPostAction
|
||||||
@Override
|
@Override
|
||||||
public void onPostAction(int statusCode, API.StatusAction statusAction, String userId, Error error) {
|
public void onPostAction(int statusCode, API.StatusAction statusAction, String userId, Error error) {
|
||||||
if( error != null){
|
if( error != null){
|
||||||
final SharedPreferences sharedpreferences = context.getSharedPreferences(Helper.APP_PREFS, Context.MODE_PRIVATE);
|
|
||||||
boolean show_error_messages = sharedpreferences.getBoolean(Helper.SET_SHOW_ERROR_MESSAGES, true);
|
|
||||||
if( show_error_messages)
|
|
||||||
Toast.makeText(context, error.getError(),Toast.LENGTH_LONG).show();
|
Toast.makeText(context, error.getError(),Toast.LENGTH_LONG).show();
|
||||||
holder.account_follow.setEnabled(true);
|
holder.account_follow.setEnabled(true);
|
||||||
return;
|
return;
|
||||||
|
|
|
@ -136,9 +136,6 @@ public class AccountsFollowRequestAdapter extends RecyclerView.Adapter implement
|
||||||
@Override
|
@Override
|
||||||
public void onPostAction(int statusCode, API.StatusAction statusAction, String userId, Error error) {
|
public void onPostAction(int statusCode, API.StatusAction statusAction, String userId, Error error) {
|
||||||
if( error != null){
|
if( error != null){
|
||||||
final SharedPreferences sharedpreferences = context.getSharedPreferences(Helper.APP_PREFS, Context.MODE_PRIVATE);
|
|
||||||
boolean show_error_messages = sharedpreferences.getBoolean(Helper.SET_SHOW_ERROR_MESSAGES, true);
|
|
||||||
if( show_error_messages)
|
|
||||||
Toast.makeText(context, error.getError(),Toast.LENGTH_LONG).show();
|
Toast.makeText(context, error.getError(),Toast.LENGTH_LONG).show();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
|
@ -210,9 +210,6 @@ public class AccountsListAdapter extends RecyclerView.Adapter implements OnPostA
|
||||||
@Override
|
@Override
|
||||||
public void onPostAction(int statusCode, API.StatusAction statusAction, String targetedId, Error error) {
|
public void onPostAction(int statusCode, API.StatusAction statusAction, String targetedId, Error error) {
|
||||||
if( error != null){
|
if( error != null){
|
||||||
final SharedPreferences sharedpreferences = context.getSharedPreferences(Helper.APP_PREFS, Context.MODE_PRIVATE);
|
|
||||||
boolean show_error_messages = sharedpreferences.getBoolean(Helper.SET_SHOW_ERROR_MESSAGES, true);
|
|
||||||
if( show_error_messages)
|
|
||||||
Toast.makeText(context, error.getError(),Toast.LENGTH_LONG).show();
|
Toast.makeText(context, error.getError(),Toast.LENGTH_LONG).show();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
|
@ -268,9 +268,6 @@ public class FilterAdapter extends BaseAdapter implements OnFilterActionInterfac
|
||||||
public void onActionDone(ManageFiltersAsyncTask.action actionType, APIResponse apiResponse, int statusCode) {
|
public void onActionDone(ManageFiltersAsyncTask.action actionType, APIResponse apiResponse, int statusCode) {
|
||||||
if( apiResponse != null) {
|
if( apiResponse != null) {
|
||||||
if (apiResponse.getError() != null) {
|
if (apiResponse.getError() != null) {
|
||||||
final SharedPreferences sharedpreferences = context.getSharedPreferences(Helper.APP_PREFS, Context.MODE_PRIVATE);
|
|
||||||
boolean show_error_messages = sharedpreferences.getBoolean(Helper.SET_SHOW_ERROR_MESSAGES, true);
|
|
||||||
if (show_error_messages)
|
|
||||||
Toast.makeText(context, apiResponse.getError().getError(), Toast.LENGTH_LONG).show();
|
Toast.makeText(context, apiResponse.getError().getError(), Toast.LENGTH_LONG).show();
|
||||||
}
|
}
|
||||||
List<Filters> filtersRes = apiResponse.getFilters();
|
List<Filters> filtersRes = apiResponse.getFilters();
|
||||||
|
|
|
@ -849,9 +849,6 @@ public class NotificationsListAdapter extends RecyclerView.Adapter implements On
|
||||||
@Override
|
@Override
|
||||||
public void onPostAction(int statusCode, API.StatusAction statusAction, String targetedId, Error error) {
|
public void onPostAction(int statusCode, API.StatusAction statusAction, String targetedId, Error error) {
|
||||||
if( error != null){
|
if( error != null){
|
||||||
final SharedPreferences sharedpreferences = context.getSharedPreferences(Helper.APP_PREFS, Context.MODE_PRIVATE);
|
|
||||||
boolean show_error_messages = sharedpreferences.getBoolean(Helper.SET_SHOW_ERROR_MESSAGES, true);
|
|
||||||
if( show_error_messages)
|
|
||||||
Toast.makeText(context, error.getError(),Toast.LENGTH_LONG).show();
|
Toast.makeText(context, error.getError(),Toast.LENGTH_LONG).show();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1944,8 +1944,6 @@ public class StatusListAdapter extends RecyclerView.Adapter implements OnPostAct
|
||||||
|
|
||||||
final SharedPreferences sharedpreferences = context.getSharedPreferences(Helper.APP_PREFS, Context.MODE_PRIVATE);
|
final SharedPreferences sharedpreferences = context.getSharedPreferences(Helper.APP_PREFS, Context.MODE_PRIVATE);
|
||||||
if( error != null){
|
if( error != null){
|
||||||
boolean show_error_messages = sharedpreferences.getBoolean(Helper.SET_SHOW_ERROR_MESSAGES, true);
|
|
||||||
if( show_error_messages)
|
|
||||||
Toast.makeText(context, error.getError(),Toast.LENGTH_LONG).show();
|
Toast.makeText(context, error.getError(),Toast.LENGTH_LONG).show();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
|
@ -195,9 +195,6 @@ public class DisplayAccountsFragment extends Fragment implements OnRetrieveAccou
|
||||||
mainLoader.setVisibility(View.GONE);
|
mainLoader.setVisibility(View.GONE);
|
||||||
nextElementLoader.setVisibility(View.GONE);
|
nextElementLoader.setVisibility(View.GONE);
|
||||||
if( apiResponse.getError() != null){
|
if( apiResponse.getError() != null){
|
||||||
final SharedPreferences sharedpreferences = context.getSharedPreferences(Helper.APP_PREFS, Context.MODE_PRIVATE);
|
|
||||||
boolean show_error_messages = sharedpreferences.getBoolean(Helper.SET_SHOW_ERROR_MESSAGES, true);
|
|
||||||
if( show_error_messages)
|
|
||||||
Toast.makeText(context, apiResponse.getError().getError(),Toast.LENGTH_LONG).show();
|
Toast.makeText(context, apiResponse.getError().getError(),Toast.LENGTH_LONG).show();
|
||||||
swipeRefreshLayout.setRefreshing(false);
|
swipeRefreshLayout.setRefreshing(false);
|
||||||
swiped = false;
|
swiped = false;
|
||||||
|
@ -229,9 +226,6 @@ public class DisplayAccountsFragment extends Fragment implements OnRetrieveAccou
|
||||||
@Override
|
@Override
|
||||||
public void onRetrieveRelationship(APIResponse apiResponse) {
|
public void onRetrieveRelationship(APIResponse apiResponse) {
|
||||||
if( apiResponse.getError() != null){
|
if( apiResponse.getError() != null){
|
||||||
final SharedPreferences sharedpreferences = context.getSharedPreferences(Helper.APP_PREFS, Context.MODE_PRIVATE);
|
|
||||||
boolean show_error_messages = sharedpreferences.getBoolean(Helper.SET_SHOW_ERROR_MESSAGES, true);
|
|
||||||
if( show_error_messages)
|
|
||||||
Toast.makeText(context, apiResponse.getError().getError(),Toast.LENGTH_LONG).show();
|
Toast.makeText(context, apiResponse.getError().getError(),Toast.LENGTH_LONG).show();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
|
@ -221,9 +221,6 @@ public class DisplayFiltersFragment extends Fragment implements OnFilterActionIn
|
||||||
mainLoader.setVisibility(View.GONE);
|
mainLoader.setVisibility(View.GONE);
|
||||||
add_new.setEnabled(true);
|
add_new.setEnabled(true);
|
||||||
if( apiResponse.getError() != null){
|
if( apiResponse.getError() != null){
|
||||||
final SharedPreferences sharedpreferences = context.getSharedPreferences(Helper.APP_PREFS, Context.MODE_PRIVATE);
|
|
||||||
boolean show_error_messages = sharedpreferences.getBoolean(Helper.SET_SHOW_ERROR_MESSAGES, true);
|
|
||||||
if( show_error_messages)
|
|
||||||
Toast.makeText(context, apiResponse.getError().getError(),Toast.LENGTH_LONG).show();
|
Toast.makeText(context, apiResponse.getError().getError(),Toast.LENGTH_LONG).show();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
|
@ -178,9 +178,6 @@ public class DisplayFollowRequestSentFragment extends Fragment implements OnRetr
|
||||||
mainLoader.setVisibility(View.GONE);
|
mainLoader.setVisibility(View.GONE);
|
||||||
nextElementLoader.setVisibility(View.GONE);
|
nextElementLoader.setVisibility(View.GONE);
|
||||||
if( apiResponse.getError() != null){
|
if( apiResponse.getError() != null){
|
||||||
final SharedPreferences sharedpreferences = context.getSharedPreferences(Helper.APP_PREFS, Context.MODE_PRIVATE);
|
|
||||||
boolean show_error_messages = sharedpreferences.getBoolean(Helper.SET_SHOW_ERROR_MESSAGES, true);
|
|
||||||
if( show_error_messages)
|
|
||||||
Toast.makeText(context, apiResponse.getError().getError(),Toast.LENGTH_LONG).show();
|
Toast.makeText(context, apiResponse.getError().getError(),Toast.LENGTH_LONG).show();
|
||||||
flag_loading = false;
|
flag_loading = false;
|
||||||
swipeRefreshLayout.setRefreshing(false);
|
swipeRefreshLayout.setRefreshing(false);
|
||||||
|
|
|
@ -163,9 +163,6 @@ public class DisplayListsFragment extends Fragment implements OnListActionInterf
|
||||||
mainLoader.setVisibility(View.GONE);
|
mainLoader.setVisibility(View.GONE);
|
||||||
add_new.setEnabled(true);
|
add_new.setEnabled(true);
|
||||||
if( apiResponse.getError() != null){
|
if( apiResponse.getError() != null){
|
||||||
final SharedPreferences sharedpreferences = context.getSharedPreferences(Helper.APP_PREFS, Context.MODE_PRIVATE);
|
|
||||||
boolean show_error_messages = sharedpreferences.getBoolean(Helper.SET_SHOW_ERROR_MESSAGES, true);
|
|
||||||
if( show_error_messages)
|
|
||||||
Toast.makeText(context, apiResponse.getError().getError(),Toast.LENGTH_LONG).show();
|
Toast.makeText(context, apiResponse.getError().getError(),Toast.LENGTH_LONG).show();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
|
@ -167,8 +167,6 @@ public class DisplayMediaFragment extends Fragment implements OnRetrieveFeedsInt
|
||||||
nextElementLoader.setVisibility(View.GONE);
|
nextElementLoader.setVisibility(View.GONE);
|
||||||
//Discards 404 - error which can often happen due to toots which have been deleted
|
//Discards 404 - error which can often happen due to toots which have been deleted
|
||||||
if( apiResponse.getError() != null && apiResponse.getError().getStatusCode() != 404 ){
|
if( apiResponse.getError() != null && apiResponse.getError().getStatusCode() != 404 ){
|
||||||
boolean show_error_messages = sharedpreferences.getBoolean(Helper.SET_SHOW_ERROR_MESSAGES, true);
|
|
||||||
if( show_error_messages )
|
|
||||||
Toast.makeText(context, apiResponse.getError().getError(),Toast.LENGTH_LONG).show();
|
Toast.makeText(context, apiResponse.getError().getError(),Toast.LENGTH_LONG).show();
|
||||||
flag_loading = false;
|
flag_loading = false;
|
||||||
return;
|
return;
|
||||||
|
|
|
@ -197,8 +197,6 @@ public class DisplayNotificationsFragment extends Fragment implements OnRetrieve
|
||||||
nextElementLoader.setVisibility(View.GONE);
|
nextElementLoader.setVisibility(View.GONE);
|
||||||
String lastReadNotifications = sharedpreferences.getString(Helper.LAST_NOTIFICATION_MAX_ID + userId + instance, null);
|
String lastReadNotifications = sharedpreferences.getString(Helper.LAST_NOTIFICATION_MAX_ID + userId + instance, null);
|
||||||
if( apiResponse.getError() != null){
|
if( apiResponse.getError() != null){
|
||||||
boolean show_error_messages = sharedpreferences.getBoolean(Helper.SET_SHOW_ERROR_MESSAGES, true);
|
|
||||||
if( show_error_messages)
|
|
||||||
Toast.makeText(context, apiResponse.getError().getError(),Toast.LENGTH_LONG).show();
|
Toast.makeText(context, apiResponse.getError().getError(),Toast.LENGTH_LONG).show();
|
||||||
flag_loading = false;
|
flag_loading = false;
|
||||||
swipeRefreshLayout.setRefreshing(false);
|
swipeRefreshLayout.setRefreshing(false);
|
||||||
|
|
|
@ -290,8 +290,6 @@ public class DisplayStatusFragment extends Fragment implements OnRetrieveFeedsIn
|
||||||
nextElementLoader.setVisibility(View.GONE);
|
nextElementLoader.setVisibility(View.GONE);
|
||||||
//Discards 404 - error which can often happen due to toots which have been deleted
|
//Discards 404 - error which can often happen due to toots which have been deleted
|
||||||
if( apiResponse.getError() != null && apiResponse.getError().getStatusCode() != 404 ){
|
if( apiResponse.getError() != null && apiResponse.getError().getStatusCode() != 404 ){
|
||||||
boolean show_error_messages = sharedpreferences.getBoolean(Helper.SET_SHOW_ERROR_MESSAGES, true);
|
|
||||||
if( show_error_messages )
|
|
||||||
Toast.makeText(context, apiResponse.getError().getError(),Toast.LENGTH_LONG).show();
|
Toast.makeText(context, apiResponse.getError().getError(),Toast.LENGTH_LONG).show();
|
||||||
swipeRefreshLayout.setRefreshing(false);
|
swipeRefreshLayout.setRefreshing(false);
|
||||||
flag_loading = false;
|
flag_loading = false;
|
||||||
|
|
|
@ -104,20 +104,7 @@ public class SettingsFragment extends Fragment {
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
boolean show_error_messages = sharedpreferences.getBoolean(Helper.SET_SHOW_ERROR_MESSAGES, true);
|
boolean show_media_urls = sharedpreferences.getBoolean(Helper.SET_MEDIA_URLS, false);
|
||||||
final CheckBox set_show_error_messages = rootView.findViewById(R.id.set_show_error_messages);
|
|
||||||
set_show_error_messages.setChecked(show_error_messages);
|
|
||||||
|
|
||||||
set_show_error_messages.setOnClickListener(new View.OnClickListener() {
|
|
||||||
@Override
|
|
||||||
public void onClick(View v) {
|
|
||||||
SharedPreferences.Editor editor = sharedpreferences.edit();
|
|
||||||
editor.putBoolean(Helper.SET_SHOW_ERROR_MESSAGES, set_show_error_messages.isChecked());
|
|
||||||
editor.apply();
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
boolean show_media_urls = sharedpreferences.getBoolean(Helper.SET_MEDIA_URLS, true);
|
|
||||||
final CheckBox set_auto_add_media_url = rootView.findViewById(R.id.set_auto_add_media_url);
|
final CheckBox set_auto_add_media_url = rootView.findViewById(R.id.set_auto_add_media_url);
|
||||||
set_auto_add_media_url.setChecked(show_media_urls);
|
set_auto_add_media_url.setChecked(show_media_urls);
|
||||||
|
|
||||||
|
@ -304,18 +291,6 @@ public class SettingsFragment extends Fragment {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
boolean multiaccount_actions = sharedpreferences.getBoolean(Helper.SET_ALLOW_CROSS_ACTIONS, true);
|
|
||||||
final CheckBox set_multiaccount_actions = rootView.findViewById(R.id.set_multiaccount_actions);
|
|
||||||
set_multiaccount_actions.setChecked(multiaccount_actions);
|
|
||||||
|
|
||||||
set_multiaccount_actions.setOnClickListener(new View.OnClickListener() {
|
|
||||||
@Override
|
|
||||||
public void onClick(View v) {
|
|
||||||
SharedPreferences.Editor editor = sharedpreferences.edit();
|
|
||||||
editor.putBoolean(Helper.SET_ALLOW_CROSS_ACTIONS, set_multiaccount_actions.isChecked());
|
|
||||||
editor.apply();
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
boolean display_local = sharedpreferences.getBoolean(Helper.SET_DISPLAY_LOCAL, true);
|
boolean display_local = sharedpreferences.getBoolean(Helper.SET_DISPLAY_LOCAL, true);
|
||||||
final CheckBox set_display_local = rootView.findViewById(R.id.set_display_local);
|
final CheckBox set_display_local = rootView.findViewById(R.id.set_display_local);
|
||||||
|
|
|
@ -69,7 +69,7 @@ public class CrossActions {
|
||||||
String userId = sharedpreferences.getString(Helper.PREF_KEY_ID, null);
|
String userId = sharedpreferences.getString(Helper.PREF_KEY_ID, null);
|
||||||
Account currentAccount = new AccountDAO(context, db).getAccountByID(userId);
|
Account currentAccount = new AccountDAO(context, db).getAccountByID(userId);
|
||||||
List<Account> accounts = new ArrayList<>();
|
List<Account> accounts = new ArrayList<>();
|
||||||
if( !limitedToOwner && sharedpreferences.getBoolean(Helper.SET_ALLOW_CROSS_ACTIONS, true) && accountstmp.size() > 1 ){
|
if( !limitedToOwner && accountstmp.size() > 1 ){
|
||||||
//It's for a reply
|
//It's for a reply
|
||||||
if( status != null){
|
if( status != null){
|
||||||
//Status is private or direct
|
//Status is private or direct
|
||||||
|
|
|
@ -294,7 +294,6 @@ public class Helper {
|
||||||
public static final String SET_WIFI_ONLY = "set_wifi_only";
|
public static final String SET_WIFI_ONLY = "set_wifi_only";
|
||||||
public static final String SET_NOTIF_HOMETIMELINE = "set_notif_hometimeline";
|
public static final String SET_NOTIF_HOMETIMELINE = "set_notif_hometimeline";
|
||||||
public static final String SET_NOTIF_SILENT = "set_notif_silent";
|
public static final String SET_NOTIF_SILENT = "set_notif_silent";
|
||||||
public static final String SET_SHOW_ERROR_MESSAGES = "set_show_error_messages";
|
|
||||||
public static final String SET_EXPAND_CW = "set_expand_cw";
|
public static final String SET_EXPAND_CW = "set_expand_cw";
|
||||||
public static final String SET_EMBEDDED_BROWSER = "set_embedded_browser";
|
public static final String SET_EMBEDDED_BROWSER = "set_embedded_browser";
|
||||||
public static final String SET_CUSTOM_TABS = "set_custom_tabs";
|
public static final String SET_CUSTOM_TABS = "set_custom_tabs";
|
||||||
|
@ -304,7 +303,6 @@ public class Helper {
|
||||||
public static final String SET_TOOT_VISIBILITY = "set_toot_visibility";
|
public static final String SET_TOOT_VISIBILITY = "set_toot_visibility";
|
||||||
public static final String SET_DISPLAY_LOCAL = "set_display_local";
|
public static final String SET_DISPLAY_LOCAL = "set_display_local";
|
||||||
public static final String SET_DISPLAY_GLOBAL = "set_display_global";
|
public static final String SET_DISPLAY_GLOBAL = "set_display_global";
|
||||||
public static final String SET_ALLOW_CROSS_ACTIONS = "set_allow_cross_actions";
|
|
||||||
public static final String SET_DISPLAY_BOOST_COUNT = "set_display_boost_count";
|
public static final String SET_DISPLAY_BOOST_COUNT = "set_display_boost_count";
|
||||||
public static final String SET_AUTOMATICALLY_SPLIT_TOOTS = "set_automatically_split_toots";
|
public static final String SET_AUTOMATICALLY_SPLIT_TOOTS = "set_automatically_split_toots";
|
||||||
public static final String SET_AUTOMATICALLY_SPLIT_TOOTS_SIZE = "set_automatically_split_toots_size";
|
public static final String SET_AUTOMATICALLY_SPLIT_TOOTS_SIZE = "set_automatically_split_toots_size";
|
||||||
|
|
|
@ -46,17 +46,6 @@
|
||||||
android:text="@string/set_share_validation_fav"
|
android:text="@string/set_share_validation_fav"
|
||||||
android:layout_height="wrap_content" />
|
android:layout_height="wrap_content" />
|
||||||
|
|
||||||
<CheckBox
|
|
||||||
android:id="@+id/set_multiaccount_actions"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:text="@string/set_multiaccount_actions"
|
|
||||||
android:layout_height="wrap_content" />
|
|
||||||
|
|
||||||
<CheckBox
|
|
||||||
android:id="@+id/set_show_error_messages"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:text="@string/set_show_error_messages"
|
|
||||||
android:layout_height="wrap_content" />
|
|
||||||
|
|
||||||
<CheckBox
|
<CheckBox
|
||||||
android:id="@+id/set_auto_add_media_url"
|
android:id="@+id/set_auto_add_media_url"
|
||||||
|
|
|
@ -46,18 +46,6 @@
|
||||||
android:text="@string/set_share_validation_fav"
|
android:text="@string/set_share_validation_fav"
|
||||||
android:layout_height="wrap_content" />
|
android:layout_height="wrap_content" />
|
||||||
|
|
||||||
<CheckBox
|
|
||||||
android:id="@+id/set_multiaccount_actions"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:text="@string/set_multiaccount_actions"
|
|
||||||
android:layout_height="wrap_content" />
|
|
||||||
|
|
||||||
<CheckBox
|
|
||||||
android:id="@+id/set_show_error_messages"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:text="@string/set_show_error_messages"
|
|
||||||
android:layout_height="wrap_content" />
|
|
||||||
|
|
||||||
<CheckBox
|
<CheckBox
|
||||||
android:id="@+id/set_auto_add_media_url"
|
android:id="@+id/set_auto_add_media_url"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
|
|
|
@ -325,7 +325,6 @@
|
||||||
<string name="set_header_picture_overlay">Choose a header picture</string>
|
<string name="set_header_picture_overlay">Choose a header picture</string>
|
||||||
<string name="set_preview_reply">Display the number of replies in home timeline</string>
|
<string name="set_preview_reply">Display the number of replies in home timeline</string>
|
||||||
<string name="set_preview_reply_pp">Display profile pictures?</string>
|
<string name="set_preview_reply_pp">Display profile pictures?</string>
|
||||||
<string name="set_multiaccount_actions">Allow interactions between accounts?</string>
|
|
||||||
<string name="set_fit_preview">Fit preview images</string>
|
<string name="set_fit_preview">Fit preview images</string>
|
||||||
<string name="set_automatically_split_toot">Automatically split toots over 500 chars in replies</string>
|
<string name="set_automatically_split_toot">Automatically split toots over 500 chars in replies</string>
|
||||||
<string name="note_no_space">You have reached the 160 characters allowed!</string>
|
<string name="note_no_space">You have reached the 160 characters allowed!</string>
|
||||||
|
@ -385,7 +384,6 @@
|
||||||
|
|
||||||
<string name="set_title_news">News</string>
|
<string name="set_title_news">News</string>
|
||||||
<string name="set_notification_news">Notify for new toots on the home timeline</string>
|
<string name="set_notification_news">Notify for new toots on the home timeline</string>
|
||||||
<string name="set_show_error_messages">Display error messages</string>
|
|
||||||
<string name="action_follow">Follow</string>
|
<string name="action_follow">Follow</string>
|
||||||
<string name="action_unfollow">Unfollow</string>s
|
<string name="action_unfollow">Unfollow</string>s
|
||||||
<string name="action_block">Block</string>
|
<string name="action_block">Block</string>
|
||||||
|
|
Loading…
Reference in New Issue