new tab
This commit is contained in:
parent
6034913c16
commit
ea54b31550
|
@ -1277,7 +1277,7 @@ public class PixelfedComposeActivity extends BaseActivity implements UploadStatu
|
||||||
toot.setSensitive(isSensitive);
|
toot.setSensitive(isSensitive);
|
||||||
toot.setVisibility(visibility);
|
toot.setVisibility(visibility);
|
||||||
toot.setMedia_attachments(attachments);
|
toot.setMedia_attachments(attachments);
|
||||||
toot.setContent(tootContent);
|
toot.setContent(PixelfedComposeActivity.this, tootContent);
|
||||||
if (timestamp == null)
|
if (timestamp == null)
|
||||||
if (scheduledstatus == null)
|
if (scheduledstatus == null)
|
||||||
new PostStatusAsyncTask(getApplicationContext(), social, account, toot, PixelfedComposeActivity.this).executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR);
|
new PostStatusAsyncTask(getApplicationContext(), social, account, toot, PixelfedComposeActivity.this).executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR);
|
||||||
|
@ -1960,7 +1960,7 @@ public class PixelfedComposeActivity extends BaseActivity implements UploadStatu
|
||||||
toot.setSensitive(isSensitive);
|
toot.setSensitive(isSensitive);
|
||||||
toot.setMedia_attachments(attachments);
|
toot.setMedia_attachments(attachments);
|
||||||
toot.setVisibility(visibility);
|
toot.setVisibility(visibility);
|
||||||
toot.setContent(currentContent);
|
toot.setContent(PixelfedComposeActivity.this, currentContent);
|
||||||
|
|
||||||
|
|
||||||
SQLiteDatabase db = Sqlite.getInstance(getApplicationContext(), Sqlite.DB_NAME, null, Sqlite.DB_VERSION).open();
|
SQLiteDatabase db = Sqlite.getInstance(getApplicationContext(), Sqlite.DB_NAME, null, Sqlite.DB_VERSION).open();
|
||||||
|
|
|
@ -110,6 +110,7 @@ public class SettingsActivity extends BaseActivity {
|
||||||
tabLayout.addTab(tabLayout.newTab().setText(getString(R.string.notifications)));
|
tabLayout.addTab(tabLayout.newTab().setText(getString(R.string.notifications)));
|
||||||
tabLayout.addTab(tabLayout.newTab().setText(getString(R.string.settings_category_label_interface)));
|
tabLayout.addTab(tabLayout.newTab().setText(getString(R.string.settings_category_label_interface)));
|
||||||
tabLayout.addTab(tabLayout.newTab().setText(getString(R.string.compose)));
|
tabLayout.addTab(tabLayout.newTab().setText(getString(R.string.compose)));
|
||||||
|
tabLayout.addTab(tabLayout.newTab().setText(getString(R.string.action_privacy)));
|
||||||
tabLayout.addTab(tabLayout.newTab().setText(getString(R.string.theming)));
|
tabLayout.addTab(tabLayout.newTab().setText(getString(R.string.theming)));
|
||||||
tabLayout.addTab(tabLayout.newTab().setText(getString(R.string.hide_menu_items)));
|
tabLayout.addTab(tabLayout.newTab().setText(getString(R.string.hide_menu_items)));
|
||||||
tabLayout.addTab(tabLayout.newTab().setText(getString(R.string.administration)));
|
tabLayout.addTab(tabLayout.newTab().setText(getString(R.string.administration)));
|
||||||
|
@ -216,14 +217,17 @@ public class SettingsActivity extends BaseActivity {
|
||||||
typeOfSettings = ContentSettingsFragment.type.COMPOSE;
|
typeOfSettings = ContentSettingsFragment.type.COMPOSE;
|
||||||
break;
|
break;
|
||||||
case 4:
|
case 4:
|
||||||
return new ColorSettingsFragment();
|
typeOfSettings = ContentSettingsFragment.type.PRIVACY;
|
||||||
|
break;
|
||||||
case 5:
|
case 5:
|
||||||
|
return new ColorSettingsFragment();
|
||||||
|
case 6:
|
||||||
typeOfSettings = ContentSettingsFragment.type.MENU;
|
typeOfSettings = ContentSettingsFragment.type.MENU;
|
||||||
break;
|
break;
|
||||||
case 6:
|
case 7:
|
||||||
typeOfSettings = ContentSettingsFragment.type.ADMIN;
|
typeOfSettings = ContentSettingsFragment.type.ADMIN;
|
||||||
break;
|
break;
|
||||||
case 7:
|
case 8:
|
||||||
typeOfSettings = ContentSettingsFragment.type.LANGUAGE;
|
typeOfSettings = ContentSettingsFragment.type.LANGUAGE;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
|
|
|
@ -2312,7 +2312,7 @@ public class TootActivity extends BaseActivity implements UploadStatusDelegate,
|
||||||
toot.setVisibility(visibility);
|
toot.setVisibility(visibility);
|
||||||
if (tootReply != null)
|
if (tootReply != null)
|
||||||
toot.setIn_reply_to_id(tootReply.getId());
|
toot.setIn_reply_to_id(tootReply.getId());
|
||||||
toot.setContent(tootContent);
|
toot.setContent(TootActivity.this, tootContent);
|
||||||
if (social == UpdateAccountInfoAsyncTask.SOCIAL.MASTODON) {
|
if (social == UpdateAccountInfoAsyncTask.SOCIAL.MASTODON) {
|
||||||
if (poll != null) {
|
if (poll != null) {
|
||||||
toot.setPoll(poll);
|
toot.setPoll(poll);
|
||||||
|
@ -2702,7 +2702,7 @@ public class TootActivity extends BaseActivity implements UploadStatusDelegate,
|
||||||
toot.setVisibility(visibility);
|
toot.setVisibility(visibility);
|
||||||
if (apiResponse.getStatuses() != null && apiResponse.getStatuses().size() > 0)
|
if (apiResponse.getStatuses() != null && apiResponse.getStatuses().size() > 0)
|
||||||
toot.setIn_reply_to_id(apiResponse.getStatuses().get(0).getId());
|
toot.setIn_reply_to_id(apiResponse.getStatuses().get(0).getId());
|
||||||
toot.setContent(tootContent);
|
toot.setContent(TootActivity.this, tootContent);
|
||||||
new PostStatusAsyncTask(getApplicationContext(), social, account, toot, TootActivity.this).executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR);
|
new PostStatusAsyncTask(getApplicationContext(), social, account, toot, TootActivity.this).executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR);
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
@ -3867,7 +3867,7 @@ public class TootActivity extends BaseActivity implements UploadStatusDelegate,
|
||||||
if (toot_cw_content.getText().toString().trim().length() > 0)
|
if (toot_cw_content.getText().toString().trim().length() > 0)
|
||||||
toot.setSpoiler_text(toot_cw_content.getText().toString().trim());
|
toot.setSpoiler_text(toot_cw_content.getText().toString().trim());
|
||||||
toot.setVisibility(visibility);
|
toot.setVisibility(visibility);
|
||||||
toot.setContent(currentContent);
|
toot.setContent(TootActivity.this, currentContent);
|
||||||
|
|
||||||
if (poll != null)
|
if (poll != null)
|
||||||
toot.setPoll(poll);
|
toot.setPoll(poll);
|
||||||
|
|
|
@ -377,7 +377,7 @@ public class API {
|
||||||
status.setUrl(comment.get("url").toString());
|
status.setUrl(comment.get("url").toString());
|
||||||
status.setSensitive(false);
|
status.setSensitive(false);
|
||||||
status.setSpoiler_text("");
|
status.setSpoiler_text("");
|
||||||
status.setContent(comment.get("text").toString());
|
status.setContent(context, comment.get("text").toString());
|
||||||
status.setIn_reply_to_id(comment.get("inReplyToCommentId").toString());
|
status.setIn_reply_to_id(comment.get("inReplyToCommentId").toString());
|
||||||
status.setAccount(parseAccountResponsePeertube(context, instance, comment.getJSONObject("account")));
|
status.setAccount(parseAccountResponsePeertube(context, instance, comment.getJSONObject("account")));
|
||||||
status.setCreated_at(Helper.mstStringToDate(context, comment.get("createdAt").toString()));
|
status.setCreated_at(Helper.mstStringToDate(context, comment.get("createdAt").toString()));
|
||||||
|
@ -652,7 +652,7 @@ public class API {
|
||||||
status.setApplication(application);
|
status.setApplication(application);
|
||||||
|
|
||||||
status.setAccount(parseAccountResponse(context, resobj.getJSONObject("account")));
|
status.setAccount(parseAccountResponse(context, resobj.getJSONObject("account")));
|
||||||
status.setContent(resobj.get("content").toString());
|
status.setContent(context, resobj.get("content").toString());
|
||||||
if (!resobj.isNull("favourites_count")) {
|
if (!resobj.isNull("favourites_count")) {
|
||||||
status.setFavourites_count(Integer.valueOf(resobj.get("favourites_count").toString()));
|
status.setFavourites_count(Integer.valueOf(resobj.get("favourites_count").toString()));
|
||||||
} else {
|
} else {
|
||||||
|
@ -750,7 +750,7 @@ public class API {
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
status.setVisibility("public");
|
status.setVisibility("public");
|
||||||
}
|
}
|
||||||
status.setContent(resobj.get("text").toString());
|
status.setContent(context, resobj.get("text").toString());
|
||||||
} catch (JSONException ignored) {
|
} catch (JSONException ignored) {
|
||||||
}
|
}
|
||||||
return status;
|
return status;
|
||||||
|
@ -850,7 +850,7 @@ public class API {
|
||||||
|
|
||||||
status.setAccount(parseMisskeyAccountResponse(context, instance, resobj.getJSONObject("user")));
|
status.setAccount(parseMisskeyAccountResponse(context, instance, resobj.getJSONObject("user")));
|
||||||
|
|
||||||
status.setContent(resobj.get("text").toString());
|
status.setContent(context, resobj.get("text").toString());
|
||||||
try {
|
try {
|
||||||
status.setReplies_count(Integer.valueOf(resobj.get("repliesCount").toString()));
|
status.setReplies_count(Integer.valueOf(resobj.get("repliesCount").toString()));
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
|
|
|
@ -1469,9 +1469,9 @@ public class Status implements Parcelable {
|
||||||
return content;
|
return content;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setContent(String content) {
|
public void setContent(Context context, String content) {
|
||||||
//Remove UTM by default
|
//Remove UTM by default
|
||||||
this.content = Helper.remove_tracking_param(content);
|
this.content = Helper.remove_tracking_param(context, content);
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean isShortReply() {
|
public boolean isShortReply() {
|
||||||
|
|
|
@ -306,9 +306,9 @@ public class GNUAPI {
|
||||||
else if (resobj.has("sender"))
|
else if (resobj.has("sender"))
|
||||||
status.setAccount(parseAccountResponse(context, resobj.getJSONObject("sender")));
|
status.setAccount(parseAccountResponse(context, resobj.getJSONObject("sender")));
|
||||||
if (resobj.has("statusnet_html"))
|
if (resobj.has("statusnet_html"))
|
||||||
status.setContent(resobj.get("statusnet_html").toString());
|
status.setContent(context, resobj.get("statusnet_html").toString());
|
||||||
else if (resobj.has("text"))
|
else if (resobj.has("text"))
|
||||||
status.setContent(resobj.get("text").toString());
|
status.setContent(context, resobj.get("text").toString());
|
||||||
if (resobj.has("fave_num"))
|
if (resobj.has("fave_num"))
|
||||||
status.setFavourites_count(Integer.valueOf(resobj.get("fave_num").toString()));
|
status.setFavourites_count(Integer.valueOf(resobj.get("fave_num").toString()));
|
||||||
else
|
else
|
||||||
|
@ -379,7 +379,7 @@ public class GNUAPI {
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
status.setVisibility("public");
|
status.setVisibility("public");
|
||||||
}
|
}
|
||||||
status.setContent(resobj.get("text").toString());
|
status.setContent(context, resobj.get("text").toString());
|
||||||
} catch (JSONException ignored) {
|
} catch (JSONException ignored) {
|
||||||
}
|
}
|
||||||
return status;
|
return status;
|
||||||
|
|
|
@ -413,7 +413,7 @@ public class PeertubeAPI {
|
||||||
status.setUrl(comment.get("url").toString());
|
status.setUrl(comment.get("url").toString());
|
||||||
status.setSensitive(false);
|
status.setSensitive(false);
|
||||||
status.setSpoiler_text("");
|
status.setSpoiler_text("");
|
||||||
status.setContent(comment.get("text").toString());
|
status.setContent(context, comment.get("text").toString());
|
||||||
status.setIn_reply_to_id(comment.get("inReplyToCommentId").toString());
|
status.setIn_reply_to_id(comment.get("inReplyToCommentId").toString());
|
||||||
status.setAccount(parseAccountResponsePeertube(context, comment.getJSONObject("account")));
|
status.setAccount(parseAccountResponsePeertube(context, comment.getJSONObject("account")));
|
||||||
status.setCreated_at(Helper.mstStringToDate(context, comment.get("createdAt").toString()));
|
status.setCreated_at(Helper.mstStringToDate(context, comment.get("createdAt").toString()));
|
||||||
|
|
|
@ -917,7 +917,7 @@ public class PixelfedListAdapter extends RecyclerView.Adapter implements OnPostA
|
||||||
toot.setMedia_attachments(status.getMedia_attachments());
|
toot.setMedia_attachments(status.getMedia_attachments());
|
||||||
if (status.getSpoiler_text() != null && status.getSpoiler_text().length() > 0)
|
if (status.getSpoiler_text() != null && status.getSpoiler_text().length() > 0)
|
||||||
toot.setSpoiler_text(status.getSpoiler_text().trim());
|
toot.setSpoiler_text(status.getSpoiler_text().trim());
|
||||||
toot.setContent(status.getContent());
|
toot.setContent(context, status.getContent());
|
||||||
toot.setVisibility(status.getVisibility());
|
toot.setVisibility(status.getVisibility());
|
||||||
if (status.getPoll() != null) {
|
if (status.getPoll() != null) {
|
||||||
toot.setPoll(status.getPoll());
|
toot.setPoll(status.getPoll());
|
||||||
|
@ -932,7 +932,7 @@ public class PixelfedListAdapter extends RecyclerView.Adapter implements OnPostA
|
||||||
if (status.getSpoiler_text() != null && status.getSpoiler_text().length() > 0)
|
if (status.getSpoiler_text() != null && status.getSpoiler_text().length() > 0)
|
||||||
toot.setSpoiler_text(status.getSpoiler_text().trim());
|
toot.setSpoiler_text(status.getSpoiler_text().trim());
|
||||||
toot.setVisibility(status.getVisibility());
|
toot.setVisibility(status.getVisibility());
|
||||||
toot.setContent(status.getContent());
|
toot.setContent(context, status.getContent());
|
||||||
if (status.getPoll() != null) {
|
if (status.getPoll() != null) {
|
||||||
toot.setPoll(status.getPoll());
|
toot.setPoll(status.getPoll());
|
||||||
} else if (status.getReblog() != null && status.getReblog().getPoll() != null) {
|
} else if (status.getReblog() != null && status.getReblog().getPoll() != null) {
|
||||||
|
@ -1170,7 +1170,7 @@ public class PixelfedListAdapter extends RecyclerView.Adapter implements OnPostA
|
||||||
Account account = new AccountDAO(context, db).getUniqAccount(userId, instance);
|
Account account = new AccountDAO(context, db).getUniqAccount(userId, instance);
|
||||||
toot.setVisibility(visibility);
|
toot.setVisibility(visibility);
|
||||||
toot.setIn_reply_to_id(in_reply_to_status);
|
toot.setIn_reply_to_id(in_reply_to_status);
|
||||||
toot.setContent(tootContent);
|
toot.setContent(context, tootContent);
|
||||||
new PostStatusAsyncTask(context, social, account, toot, PixelfedListAdapter.this).executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR);
|
new PostStatusAsyncTask(context, social, account, toot, PixelfedListAdapter.this).executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR);
|
||||||
status.setQuickReplyPrivacy(null);
|
status.setQuickReplyPrivacy(null);
|
||||||
status.setQuickReplyContent(null);
|
status.setQuickReplyContent(null);
|
||||||
|
|
|
@ -544,7 +544,7 @@ public class StatusListAdapter extends RecyclerView.Adapter implements OnPostAct
|
||||||
toot.setVisibility(apiResponse.getStatuses().get(0).getVisibility());
|
toot.setVisibility(apiResponse.getStatuses().get(0).getVisibility());
|
||||||
if (apiResponse.getStatuses() != null && apiResponse.getStatuses().size() > 0)
|
if (apiResponse.getStatuses() != null && apiResponse.getStatuses().size() > 0)
|
||||||
toot.setIn_reply_to_id(apiResponse.getStatuses().get(0).getId());
|
toot.setIn_reply_to_id(apiResponse.getStatuses().get(0).getId());
|
||||||
toot.setContent(tootContent);
|
toot.setContent(context, tootContent);
|
||||||
final SQLiteDatabase db = Sqlite.getInstance(context, Sqlite.DB_NAME, null, Sqlite.DB_VERSION).open();
|
final SQLiteDatabase db = Sqlite.getInstance(context, Sqlite.DB_NAME, null, Sqlite.DB_VERSION).open();
|
||||||
Account account = new AccountDAO(context, db).getUniqAccount(userId, instance);
|
Account account = new AccountDAO(context, db).getUniqAccount(userId, instance);
|
||||||
new PostStatusAsyncTask(context, social, account, toot, StatusListAdapter.this).executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR);
|
new PostStatusAsyncTask(context, social, account, toot, StatusListAdapter.this).executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR);
|
||||||
|
@ -2681,7 +2681,7 @@ public class StatusListAdapter extends RecyclerView.Adapter implements OnPostAct
|
||||||
toot.setMedia_attachments(status.getMedia_attachments());
|
toot.setMedia_attachments(status.getMedia_attachments());
|
||||||
if (status.getSpoiler_text() != null && status.getSpoiler_text().length() > 0)
|
if (status.getSpoiler_text() != null && status.getSpoiler_text().length() > 0)
|
||||||
toot.setSpoiler_text(status.getSpoiler_text().trim());
|
toot.setSpoiler_text(status.getSpoiler_text().trim());
|
||||||
toot.setContent(status.getContent());
|
toot.setContent(context, status.getContent());
|
||||||
toot.setVisibility(status.getVisibility());
|
toot.setVisibility(status.getVisibility());
|
||||||
new RetrieveFeedsAsyncTask(context, RetrieveFeedsAsyncTask.Type.ONESTATUS, status.getIn_reply_to_id(), null, false, false, StatusListAdapter.this).executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR);
|
new RetrieveFeedsAsyncTask(context, RetrieveFeedsAsyncTask.Type.ONESTATUS, status.getIn_reply_to_id(), null, false, false, StatusListAdapter.this).executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR);
|
||||||
} else {
|
} else {
|
||||||
|
@ -2691,7 +2691,7 @@ public class StatusListAdapter extends RecyclerView.Adapter implements OnPostAct
|
||||||
if (status.getSpoiler_text() != null && status.getSpoiler_text().length() > 0)
|
if (status.getSpoiler_text() != null && status.getSpoiler_text().length() > 0)
|
||||||
toot.setSpoiler_text(status.getSpoiler_text().trim());
|
toot.setSpoiler_text(status.getSpoiler_text().trim());
|
||||||
toot.setVisibility(status.getVisibility());
|
toot.setVisibility(status.getVisibility());
|
||||||
toot.setContent(status.getContent());
|
toot.setContent(context, status.getContent());
|
||||||
final SQLiteDatabase db = Sqlite.getInstance(context, Sqlite.DB_NAME, null, Sqlite.DB_VERSION).open();
|
final SQLiteDatabase db = Sqlite.getInstance(context, Sqlite.DB_NAME, null, Sqlite.DB_VERSION).open();
|
||||||
long id = new StatusStoredDAO(context, db).insertStatus(toot, null);
|
long id = new StatusStoredDAO(context, db).insertStatus(toot, null);
|
||||||
Intent intentToot = new Intent(context, TootActivity.class);
|
Intent intentToot = new Intent(context, TootActivity.class);
|
||||||
|
@ -3082,7 +3082,7 @@ public class StatusListAdapter extends RecyclerView.Adapter implements OnPostAct
|
||||||
toot.setMedia_attachments(status.getMedia_attachments());
|
toot.setMedia_attachments(status.getMedia_attachments());
|
||||||
if (status.getSpoiler_text() != null && status.getSpoiler_text().length() > 0)
|
if (status.getSpoiler_text() != null && status.getSpoiler_text().length() > 0)
|
||||||
toot.setSpoiler_text(status.getSpoiler_text().trim());
|
toot.setSpoiler_text(status.getSpoiler_text().trim());
|
||||||
toot.setContent(status.getContent());
|
toot.setContent(context, status.getContent());
|
||||||
toot.setVisibility(status.getVisibility());
|
toot.setVisibility(status.getVisibility());
|
||||||
if (status.getPoll() != null) {
|
if (status.getPoll() != null) {
|
||||||
toot.setPoll(status.getPoll());
|
toot.setPoll(status.getPoll());
|
||||||
|
@ -3097,7 +3097,7 @@ public class StatusListAdapter extends RecyclerView.Adapter implements OnPostAct
|
||||||
if (status.getSpoiler_text() != null && status.getSpoiler_text().length() > 0)
|
if (status.getSpoiler_text() != null && status.getSpoiler_text().length() > 0)
|
||||||
toot.setSpoiler_text(status.getSpoiler_text().trim());
|
toot.setSpoiler_text(status.getSpoiler_text().trim());
|
||||||
toot.setVisibility(status.getVisibility());
|
toot.setVisibility(status.getVisibility());
|
||||||
toot.setContent(status.getContent());
|
toot.setContent(context, status.getContent());
|
||||||
if (status.getPoll() != null) {
|
if (status.getPoll() != null) {
|
||||||
toot.setPoll(status.getPoll());
|
toot.setPoll(status.getPoll());
|
||||||
} else if (status.getReblog() != null && status.getReblog().getPoll() != null) {
|
} else if (status.getReblog() != null && status.getReblog().getPoll() != null) {
|
||||||
|
@ -3917,7 +3917,7 @@ public class StatusListAdapter extends RecyclerView.Adapter implements OnPostAct
|
||||||
toot.setSpoiler_text(toot_cw_content.getText().toString().trim());
|
toot.setSpoiler_text(toot_cw_content.getText().toString().trim());
|
||||||
toot.setVisibility(status.getQuickReplyPrivacy());
|
toot.setVisibility(status.getQuickReplyPrivacy());
|
||||||
toot.setIn_reply_to_id(in_reply_to_status);
|
toot.setIn_reply_to_id(in_reply_to_status);
|
||||||
toot.setContent(status.getQuickReplyContent());
|
toot.setContent(context, status.getQuickReplyContent());
|
||||||
new PostStatusAsyncTask(context, social, account, toot, StatusListAdapter.this).executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR);
|
new PostStatusAsyncTask(context, social, account, toot, StatusListAdapter.this).executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR);
|
||||||
status.setQuickReplyPrivacy(null);
|
status.setQuickReplyPrivacy(null);
|
||||||
status.setQuickReplyContent(null);
|
status.setQuickReplyContent(null);
|
||||||
|
@ -4151,7 +4151,7 @@ public class StatusListAdapter extends RecyclerView.Adapter implements OnPostAct
|
||||||
toot.setVisibility(statusForQuickReply.getQuickReplyPrivacy());
|
toot.setVisibility(statusForQuickReply.getQuickReplyPrivacy());
|
||||||
}
|
}
|
||||||
if (statusForQuickReply.getQuickReplyContent() != null) {
|
if (statusForQuickReply.getQuickReplyContent() != null) {
|
||||||
toot.setContent(statusForQuickReply.getQuickReplyContent().trim());
|
toot.setContent(context, statusForQuickReply.getQuickReplyContent().trim());
|
||||||
}
|
}
|
||||||
|
|
||||||
toot.setIn_reply_to_id(tootReply.getId());
|
toot.setIn_reply_to_id(tootReply.getId());
|
||||||
|
|
|
@ -120,6 +120,7 @@ import static app.fedilab.android.fragments.ContentSettingsFragment.type.INTERFA
|
||||||
import static app.fedilab.android.fragments.ContentSettingsFragment.type.LANGUAGE;
|
import static app.fedilab.android.fragments.ContentSettingsFragment.type.LANGUAGE;
|
||||||
import static app.fedilab.android.fragments.ContentSettingsFragment.type.MENU;
|
import static app.fedilab.android.fragments.ContentSettingsFragment.type.MENU;
|
||||||
import static app.fedilab.android.fragments.ContentSettingsFragment.type.NOTIFICATIONS;
|
import static app.fedilab.android.fragments.ContentSettingsFragment.type.NOTIFICATIONS;
|
||||||
|
import static app.fedilab.android.fragments.ContentSettingsFragment.type.PRIVACY;
|
||||||
import static app.fedilab.android.fragments.ContentSettingsFragment.type.TIMELINES;
|
import static app.fedilab.android.fragments.ContentSettingsFragment.type.TIMELINES;
|
||||||
|
|
||||||
public class ContentSettingsFragment extends Fragment implements OnRetrieveRemoteAccountInterface, OnRetrieveRelationshipInterface {
|
public class ContentSettingsFragment extends Fragment implements OnRetrieveRemoteAccountInterface, OnRetrieveRelationshipInterface {
|
||||||
|
@ -380,6 +381,7 @@ public class ContentSettingsFragment extends Fragment implements OnRetrieveRemot
|
||||||
LinearLayout settings_admin = rootView.findViewById(R.id.settings_admin);
|
LinearLayout settings_admin = rootView.findViewById(R.id.settings_admin);
|
||||||
LinearLayout settings_interface = rootView.findViewById(R.id.settings_interface);
|
LinearLayout settings_interface = rootView.findViewById(R.id.settings_interface);
|
||||||
LinearLayout settings_compose = rootView.findViewById(R.id.settings_compose);
|
LinearLayout settings_compose = rootView.findViewById(R.id.settings_compose);
|
||||||
|
LinearLayout settings_privacy = rootView.findViewById(R.id.settings_privacy);
|
||||||
LinearLayout settings_hide_menu = rootView.findViewById(R.id.settings_hide_menu);
|
LinearLayout settings_hide_menu = rootView.findViewById(R.id.settings_hide_menu);
|
||||||
LinearLayout settings_translation = rootView.findViewById(R.id.settings_translation);
|
LinearLayout settings_translation = rootView.findViewById(R.id.settings_translation);
|
||||||
|
|
||||||
|
@ -394,6 +396,8 @@ public class ContentSettingsFragment extends Fragment implements OnRetrieveRemot
|
||||||
settings_interface.setVisibility(View.VISIBLE);
|
settings_interface.setVisibility(View.VISIBLE);
|
||||||
} else if (type == COMPOSE) {
|
} else if (type == COMPOSE) {
|
||||||
settings_compose.setVisibility(View.VISIBLE);
|
settings_compose.setVisibility(View.VISIBLE);
|
||||||
|
} else if (type == PRIVACY) {
|
||||||
|
settings_privacy.setVisibility(View.VISIBLE);
|
||||||
} else if (type == MENU) {
|
} else if (type == MENU) {
|
||||||
settings_hide_menu.setVisibility(View.VISIBLE);
|
settings_hide_menu.setVisibility(View.VISIBLE);
|
||||||
} else if (type == LANGUAGE) {
|
} else if (type == LANGUAGE) {
|
||||||
|
@ -945,6 +949,20 @@ public class ContentSettingsFragment extends Fragment implements OnRetrieveRemot
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
|
final SwitchCompat set_utm_parameters = rootView.findViewById(R.id.set_utm_parameters);
|
||||||
|
boolean utm_parameters = sharedpreferences.getBoolean(Helper.SET_FILTER_UTM, true);
|
||||||
|
set_utm_parameters.setChecked(utm_parameters);
|
||||||
|
|
||||||
|
set_utm_parameters.setOnClickListener(new View.OnClickListener() {
|
||||||
|
@Override
|
||||||
|
public void onClick(View v) {
|
||||||
|
SharedPreferences.Editor editor = sharedpreferences.edit();
|
||||||
|
editor.putBoolean(Helper.SET_FILTER_UTM, set_utm_parameters.isChecked());
|
||||||
|
editor.apply();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
TextView set_nitter_host = rootView.findViewById(R.id.set_nitter_host);
|
TextView set_nitter_host = rootView.findViewById(R.id.set_nitter_host);
|
||||||
boolean nitter = sharedpreferences.getBoolean(Helper.SET_NITTER, false);
|
boolean nitter = sharedpreferences.getBoolean(Helper.SET_NITTER, false);
|
||||||
final SwitchCompat set_nitter = rootView.findViewById(R.id.set_nitter);
|
final SwitchCompat set_nitter = rootView.findViewById(R.id.set_nitter);
|
||||||
|
@ -2667,6 +2685,7 @@ public class ContentSettingsFragment extends Fragment implements OnRetrieveRemot
|
||||||
NOTIFICATIONS,
|
NOTIFICATIONS,
|
||||||
INTERFACE,
|
INTERFACE,
|
||||||
COMPOSE,
|
COMPOSE,
|
||||||
|
PRIVACY,
|
||||||
LANGUAGE,
|
LANGUAGE,
|
||||||
MENU,
|
MENU,
|
||||||
COLORS
|
COLORS
|
||||||
|
|
|
@ -442,6 +442,7 @@ public class Helper {
|
||||||
public static final String SET_INVIDIOUS_HOST = "set_invidious_host";
|
public static final String SET_INVIDIOUS_HOST = "set_invidious_host";
|
||||||
public static final String DEFAULT_INVIDIOUS_HOST = "invidio.us";
|
public static final String DEFAULT_INVIDIOUS_HOST = "invidio.us";
|
||||||
|
|
||||||
|
public static final String SET_FILTER_UTM = "set_filter_utm";
|
||||||
public static final String SET_NITTER = "set_nitter";
|
public static final String SET_NITTER = "set_nitter";
|
||||||
public static final String SET_NITTER_HOST = "set_nitter_host";
|
public static final String SET_NITTER_HOST = "set_nitter_host";
|
||||||
public static final String DEFAULT_NITTER_HOST = "nitter.net";
|
public static final String DEFAULT_NITTER_HOST = "nitter.net";
|
||||||
|
@ -4106,14 +4107,18 @@ public class Helper {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public static String remove_tracking_param(String original_content) {
|
public static String remove_tracking_param(Context context, String original_content) {
|
||||||
if (original_content == null)
|
if (original_content == null)
|
||||||
return original_content;
|
return original_content;
|
||||||
String cleaned_content = original_content;
|
String cleaned_content = original_content;
|
||||||
for (String utm : UTM_PARAMS) {
|
final SharedPreferences sharedpreferences = context.getSharedPreferences(Helper.APP_PREFS, Context.MODE_PRIVATE);
|
||||||
cleaned_content = cleaned_content.replaceAll("&" + utm + "=[0-9a-zA-Z._-]*", "");
|
boolean utm_parameters = sharedpreferences.getBoolean(Helper.SET_FILTER_UTM, true);
|
||||||
cleaned_content = cleaned_content.replaceAll("&" + utm + "=[0-9a-zA-Z._-]*", "");
|
if( utm_parameters ) {
|
||||||
cleaned_content = cleaned_content.replaceAll("\\?" + utm + "=[0-9a-zA-Z._-]*", "?");
|
for (String utm : UTM_PARAMS) {
|
||||||
|
cleaned_content = cleaned_content.replaceAll("&" + utm + "=[0-9a-zA-Z._-]*", "");
|
||||||
|
cleaned_content = cleaned_content.replaceAll("&" + utm + "=[0-9a-zA-Z._-]*", "");
|
||||||
|
cleaned_content = cleaned_content.replaceAll("\\?" + utm + "=[0-9a-zA-Z._-]*", "?");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return cleaned_content;
|
return cleaned_content;
|
||||||
}
|
}
|
||||||
|
|
|
@ -765,7 +765,7 @@ public class StatusCacheDAO {
|
||||||
status.setIn_reply_to_id(c.getString(c.getColumnIndex(Sqlite.COL_IN_REPLY_TO_ID)));
|
status.setIn_reply_to_id(c.getString(c.getColumnIndex(Sqlite.COL_IN_REPLY_TO_ID)));
|
||||||
status.setIn_reply_to_account_id(c.getString(c.getColumnIndex(Sqlite.COL_IN_REPLY_TO_ACCOUNT_ID)));
|
status.setIn_reply_to_account_id(c.getString(c.getColumnIndex(Sqlite.COL_IN_REPLY_TO_ACCOUNT_ID)));
|
||||||
status.setReblog(Helper.restoreStatusFromString(c.getString(c.getColumnIndex(Sqlite.COL_REBLOG))));
|
status.setReblog(Helper.restoreStatusFromString(c.getString(c.getColumnIndex(Sqlite.COL_REBLOG))));
|
||||||
status.setContent(c.getString(c.getColumnIndex(Sqlite.COL_CONTENT)));
|
status.setContent(context, c.getString(c.getColumnIndex(Sqlite.COL_CONTENT)));
|
||||||
status.setCreated_at(Helper.stringToDate(context, c.getString(c.getColumnIndex(Sqlite.COL_CREATED_AT))));
|
status.setCreated_at(Helper.stringToDate(context, c.getString(c.getColumnIndex(Sqlite.COL_CREATED_AT))));
|
||||||
status.setEmojis(Helper.restoreEmojisFromString(c.getString(c.getColumnIndex(Sqlite.COL_EMOJIS))));
|
status.setEmojis(Helper.restoreEmojisFromString(c.getString(c.getColumnIndex(Sqlite.COL_EMOJIS))));
|
||||||
status.setReblogs_count(c.getInt(c.getColumnIndex(Sqlite.COL_REBLOGS_COUNT)));
|
status.setReblogs_count(c.getInt(c.getColumnIndex(Sqlite.COL_REBLOGS_COUNT)));
|
||||||
|
@ -812,7 +812,7 @@ public class StatusCacheDAO {
|
||||||
status.setIn_reply_to_id(c.getString(c.getColumnIndex(Sqlite.COL_IN_REPLY_TO_ID)));
|
status.setIn_reply_to_id(c.getString(c.getColumnIndex(Sqlite.COL_IN_REPLY_TO_ID)));
|
||||||
status.setIn_reply_to_account_id(c.getString(c.getColumnIndex(Sqlite.COL_IN_REPLY_TO_ACCOUNT_ID)));
|
status.setIn_reply_to_account_id(c.getString(c.getColumnIndex(Sqlite.COL_IN_REPLY_TO_ACCOUNT_ID)));
|
||||||
status.setReblog(Helper.restoreStatusFromString(c.getString(c.getColumnIndex(Sqlite.COL_REBLOG))));
|
status.setReblog(Helper.restoreStatusFromString(c.getString(c.getColumnIndex(Sqlite.COL_REBLOG))));
|
||||||
status.setContent(c.getString(c.getColumnIndex(Sqlite.COL_CONTENT)));
|
status.setContent(context, c.getString(c.getColumnIndex(Sqlite.COL_CONTENT)));
|
||||||
status.setCreated_at(Helper.stringToDate(context, c.getString(c.getColumnIndex(Sqlite.COL_CREATED_AT))));
|
status.setCreated_at(Helper.stringToDate(context, c.getString(c.getColumnIndex(Sqlite.COL_CREATED_AT))));
|
||||||
status.setEmojis(Helper.restoreEmojisFromString(c.getString(c.getColumnIndex(Sqlite.COL_EMOJIS))));
|
status.setEmojis(Helper.restoreEmojisFromString(c.getString(c.getColumnIndex(Sqlite.COL_EMOJIS))));
|
||||||
status.setReblogs_count(c.getInt(c.getColumnIndex(Sqlite.COL_REBLOGS_COUNT)));
|
status.setReblogs_count(c.getInt(c.getColumnIndex(Sqlite.COL_REBLOGS_COUNT)));
|
||||||
|
|
|
@ -193,96 +193,6 @@
|
||||||
android:layout_gravity="center_vertical" />
|
android:layout_gravity="center_vertical" />
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
<LinearLayout
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_marginTop="@dimen/settings_option_margin"
|
|
||||||
android:layout_marginBottom="@dimen/settings_option_margin"
|
|
||||||
android:gravity="center_vertical"
|
|
||||||
android:orientation="horizontal">
|
|
||||||
|
|
||||||
<LinearLayout
|
|
||||||
android:layout_width="0dp"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_marginEnd="10dp"
|
|
||||||
android:layout_weight="1"
|
|
||||||
android:orientation="vertical">
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:text="@string/set_invidious"
|
|
||||||
android:textSize="16sp" />
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:text="@string/set_invidious_indication"
|
|
||||||
android:textColor="@color/mastodonC2"
|
|
||||||
android:textSize="12sp" />
|
|
||||||
|
|
||||||
</LinearLayout>
|
|
||||||
|
|
||||||
<androidx.appcompat.widget.SwitchCompat
|
|
||||||
android:id="@+id/set_invidious"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content" />
|
|
||||||
|
|
||||||
</LinearLayout>
|
|
||||||
|
|
||||||
<EditText
|
|
||||||
android:id="@+id/set_invidious_host"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:ellipsize="end"
|
|
||||||
android:hint="@string/set_invidious_host"
|
|
||||||
android:inputType="textWebEditText" />
|
|
||||||
|
|
||||||
<LinearLayout
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_marginTop="@dimen/settings_option_margin"
|
|
||||||
android:layout_marginBottom="@dimen/settings_option_margin"
|
|
||||||
android:gravity="center_vertical"
|
|
||||||
android:orientation="horizontal">
|
|
||||||
|
|
||||||
<LinearLayout
|
|
||||||
android:layout_width="0dp"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_marginEnd="10dp"
|
|
||||||
android:layout_weight="1"
|
|
||||||
android:orientation="vertical">
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:text="@string/set_nitter"
|
|
||||||
android:textSize="16sp" />
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:text="@string/set_nitter_indication"
|
|
||||||
android:textColor="@color/mastodonC2"
|
|
||||||
android:textSize="12sp" />
|
|
||||||
|
|
||||||
</LinearLayout>
|
|
||||||
|
|
||||||
<androidx.appcompat.widget.SwitchCompat
|
|
||||||
android:id="@+id/set_nitter"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content" />
|
|
||||||
|
|
||||||
</LinearLayout>
|
|
||||||
|
|
||||||
|
|
||||||
<EditText
|
|
||||||
android:id="@+id/set_nitter_host"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:ellipsize="end"
|
|
||||||
android:hint="@string/set_nitter_host"
|
|
||||||
android:inputType="textWebEditText" />
|
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
|
@ -1852,36 +1762,6 @@
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
|
|
||||||
<!-- user agent -->
|
|
||||||
<LinearLayout
|
|
||||||
android:layout_marginTop="@dimen/settings_option_margin"
|
|
||||||
android:layout_marginBottom="@dimen/settings_option_margin"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:orientation="vertical">
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:labelFor="@+id/set_user_agent"
|
|
||||||
android:text="@string/set_user_agent"
|
|
||||||
android:textSize="16sp" />
|
|
||||||
|
|
||||||
<EditText
|
|
||||||
android:id="@+id/set_user_agent"
|
|
||||||
android:ellipsize="end"
|
|
||||||
android:hint="@string/set_user_agent_hint"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:inputType="textMultiLine"
|
|
||||||
android:lines="2"
|
|
||||||
/>
|
|
||||||
<TextView
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:text="@string/set_user_agent_indication"
|
|
||||||
android:textColor="@color/mastodonC2" />
|
|
||||||
</LinearLayout>
|
|
||||||
|
|
||||||
<!-- TRUNCATE LONG TOOTS -->
|
<!-- TRUNCATE LONG TOOTS -->
|
||||||
<TextView
|
<TextView
|
||||||
|
@ -1992,127 +1872,7 @@
|
||||||
android:textStyle="italic" />
|
android:textStyle="italic" />
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
<LinearLayout
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_marginTop="@dimen/settings_option_margin"
|
|
||||||
android:layout_marginBottom="@dimen/settings_option_margin"
|
|
||||||
android:gravity="center_vertical"
|
|
||||||
android:orientation="horizontal">
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:layout_width="0dp"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_marginEnd="10dp"
|
|
||||||
android:layout_weight="1"
|
|
||||||
android:text="@string/embedded_browser"
|
|
||||||
android:textSize="16sp" />
|
|
||||||
|
|
||||||
<androidx.appcompat.widget.SwitchCompat
|
|
||||||
android:id="@+id/set_embedded_browser"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content" />
|
|
||||||
|
|
||||||
</LinearLayout>
|
|
||||||
|
|
||||||
<Button
|
|
||||||
android:id="@+id/update_tracking_domains"
|
|
||||||
style="@style/Base.Widget.AppCompat.Button.Colored"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_gravity="center_horizontal"
|
|
||||||
android:gravity="center"
|
|
||||||
android:text="@string/update_tracking_domains"
|
|
||||||
android:textSize="16sp" />
|
|
||||||
|
|
||||||
<LinearLayout
|
|
||||||
android:id="@+id/custom_tabs_container"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_marginTop="@dimen/settings_option_margin"
|
|
||||||
android:layout_marginBottom="@dimen/settings_option_margin"
|
|
||||||
android:gravity="center_vertical"
|
|
||||||
android:orientation="horizontal">
|
|
||||||
|
|
||||||
<LinearLayout
|
|
||||||
android:layout_width="0dp"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_marginEnd="10dp"
|
|
||||||
android:layout_weight="1"
|
|
||||||
android:orientation="vertical">
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:text="@string/custom_tabs"
|
|
||||||
android:textSize="16sp" />
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:text="@string/set_enable_crash_report_indication"
|
|
||||||
android:textColor="@color/mastodonC2"
|
|
||||||
android:textSize="12sp" />
|
|
||||||
</LinearLayout>
|
|
||||||
|
|
||||||
<androidx.appcompat.widget.SwitchCompat
|
|
||||||
android:id="@+id/set_custom_tabs"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content" />
|
|
||||||
|
|
||||||
</LinearLayout>
|
|
||||||
|
|
||||||
<LinearLayout
|
|
||||||
android:id="@+id/set_javascript_container"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_gravity="center_vertical"
|
|
||||||
android:orientation="vertical"
|
|
||||||
android:visibility="gone">
|
|
||||||
|
|
||||||
<LinearLayout
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:orientation="horizontal">
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_gravity="center_vertical"
|
|
||||||
android:text="@string/use_javascript"
|
|
||||||
android:textSize="16sp" />
|
|
||||||
|
|
||||||
<androidx.appcompat.widget.SwitchCompat
|
|
||||||
android:id="@+id/set_javascript"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_gravity="center_vertical"
|
|
||||||
android:layout_margin="10dp"
|
|
||||||
android:gravity="center" />
|
|
||||||
</LinearLayout>
|
|
||||||
|
|
||||||
<LinearLayout
|
|
||||||
android:id="@+id/set_cookies_container"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:orientation="horizontal">
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_gravity="center_vertical"
|
|
||||||
android:text="@string/use_cookies"
|
|
||||||
android:textSize="16sp" />
|
|
||||||
|
|
||||||
<androidx.appcompat.widget.SwitchCompat
|
|
||||||
android:id="@+id/set_cookies"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_gravity="center_vertical"
|
|
||||||
android:layout_margin="10dp"
|
|
||||||
android:gravity="center" />
|
|
||||||
</LinearLayout>
|
|
||||||
</LinearLayout>
|
|
||||||
|
|
||||||
|
|
||||||
<!-- NSFW Timeout -->
|
<!-- NSFW Timeout -->
|
||||||
|
@ -2676,6 +2436,299 @@
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
|
<!-- Privacy -->
|
||||||
|
<LinearLayout
|
||||||
|
android:id="@+id/settings_privacy"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:orientation="vertical"
|
||||||
|
android:visibility="gone">
|
||||||
|
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="@dimen/settings_option_margin"
|
||||||
|
android:layout_marginBottom="@dimen/settings_option_margin"
|
||||||
|
android:gravity="center_vertical"
|
||||||
|
android:orientation="horizontal">
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginEnd="10dp"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:orientation="vertical">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="@string/set_invidious"
|
||||||
|
android:textSize="16sp" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="@string/set_invidious_indication"
|
||||||
|
android:textColor="@color/mastodonC2"
|
||||||
|
android:textSize="12sp" />
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<androidx.appcompat.widget.SwitchCompat
|
||||||
|
android:id="@+id/set_invidious"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content" />
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<EditText
|
||||||
|
android:id="@+id/set_invidious_host"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:ellipsize="end"
|
||||||
|
android:hint="@string/set_invidious_host"
|
||||||
|
android:inputType="textWebEditText" />
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="@dimen/settings_option_margin"
|
||||||
|
android:layout_marginBottom="@dimen/settings_option_margin"
|
||||||
|
android:gravity="center_vertical"
|
||||||
|
android:orientation="horizontal">
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginEnd="10dp"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:orientation="vertical">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="@string/set_nitter"
|
||||||
|
android:textSize="16sp" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="@string/set_nitter_indication"
|
||||||
|
android:textColor="@color/mastodonC2"
|
||||||
|
android:textSize="12sp" />
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<androidx.appcompat.widget.SwitchCompat
|
||||||
|
android:id="@+id/set_nitter"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content" />
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
|
||||||
|
<EditText
|
||||||
|
android:id="@+id/set_nitter_host"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:ellipsize="end"
|
||||||
|
android:hint="@string/set_nitter_host"
|
||||||
|
android:inputType="textWebEditText" />
|
||||||
|
|
||||||
|
<!-- utm parameters -->
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="@dimen/settings_option_margin"
|
||||||
|
android:layout_marginBottom="@dimen/settings_option_margin"
|
||||||
|
android:gravity="center_vertical"
|
||||||
|
android:orientation="horizontal">
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginEnd="10dp"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:orientation="vertical">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="@string/set_utm_parameters"
|
||||||
|
android:textSize="16sp" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="@string/set_utm_parameters_indication"
|
||||||
|
android:textColor="@color/mastodonC2"
|
||||||
|
android:textSize="12sp" />
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<androidx.appcompat.widget.SwitchCompat
|
||||||
|
android:id="@+id/set_utm_parameters"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content" />
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<!-- user agent -->
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_marginTop="@dimen/settings_option_margin"
|
||||||
|
android:layout_marginBottom="@dimen/settings_option_margin"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:orientation="vertical">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:labelFor="@+id/set_user_agent"
|
||||||
|
android:text="@string/set_user_agent"
|
||||||
|
android:textSize="16sp" />
|
||||||
|
|
||||||
|
<EditText
|
||||||
|
android:id="@+id/set_user_agent"
|
||||||
|
android:ellipsize="end"
|
||||||
|
android:hint="@string/set_user_agent_hint"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:inputType="textMultiLine"
|
||||||
|
android:lines="2"
|
||||||
|
/>
|
||||||
|
<TextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="@string/set_user_agent_indication"
|
||||||
|
android:textColor="@color/mastodonC2" />
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="@dimen/settings_option_margin"
|
||||||
|
android:layout_marginBottom="@dimen/settings_option_margin"
|
||||||
|
android:gravity="center_vertical"
|
||||||
|
android:orientation="horizontal">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginEnd="10dp"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:text="@string/embedded_browser"
|
||||||
|
android:textSize="16sp" />
|
||||||
|
|
||||||
|
<androidx.appcompat.widget.SwitchCompat
|
||||||
|
android:id="@+id/set_embedded_browser"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content" />
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<Button
|
||||||
|
android:id="@+id/update_tracking_domains"
|
||||||
|
style="@style/Base.Widget.AppCompat.Button.Colored"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_gravity="center_horizontal"
|
||||||
|
android:gravity="center"
|
||||||
|
android:text="@string/update_tracking_domains"
|
||||||
|
android:textSize="16sp" />
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:id="@+id/custom_tabs_container"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="@dimen/settings_option_margin"
|
||||||
|
android:layout_marginBottom="@dimen/settings_option_margin"
|
||||||
|
android:gravity="center_vertical"
|
||||||
|
android:orientation="horizontal">
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginEnd="10dp"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:orientation="vertical">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="@string/custom_tabs"
|
||||||
|
android:textSize="16sp" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="@string/set_enable_crash_report_indication"
|
||||||
|
android:textColor="@color/mastodonC2"
|
||||||
|
android:textSize="12sp" />
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<androidx.appcompat.widget.SwitchCompat
|
||||||
|
android:id="@+id/set_custom_tabs"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content" />
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:id="@+id/set_javascript_container"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_gravity="center_vertical"
|
||||||
|
android:orientation="vertical"
|
||||||
|
android:visibility="gone">
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:orientation="horizontal">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_gravity="center_vertical"
|
||||||
|
android:text="@string/use_javascript"
|
||||||
|
android:textSize="16sp" />
|
||||||
|
|
||||||
|
<androidx.appcompat.widget.SwitchCompat
|
||||||
|
android:id="@+id/set_javascript"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_gravity="center_vertical"
|
||||||
|
android:layout_margin="10dp"
|
||||||
|
android:gravity="center" />
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:id="@+id/set_cookies_container"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:orientation="horizontal">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_gravity="center_vertical"
|
||||||
|
android:text="@string/use_cookies"
|
||||||
|
android:textSize="16sp" />
|
||||||
|
|
||||||
|
<androidx.appcompat.widget.SwitchCompat
|
||||||
|
android:id="@+id/set_cookies"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_gravity="center_vertical"
|
||||||
|
android:layout_margin="10dp"
|
||||||
|
android:gravity="center" />
|
||||||
|
</LinearLayout>
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
<!-- HIDE MENU -->
|
<!-- HIDE MENU -->
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:id="@+id/settings_hide_menu"
|
android:id="@+id/settings_hide_menu"
|
||||||
|
|
|
@ -1200,4 +1200,6 @@
|
||||||
<string name="set_user_agent">Change the user agent</string>
|
<string name="set_user_agent">Change the user agent</string>
|
||||||
<string name="set_user_agent_hint">Set a custom user agent or leave blank</string>
|
<string name="set_user_agent_hint">Set a custom user agent or leave blank</string>
|
||||||
<string name="set_user_agent_indication">Allows to customize the user agent used for api calls or with the built-in browser.</string>
|
<string name="set_user_agent_indication">Allows to customize the user agent used for api calls or with the built-in browser.</string>
|
||||||
|
<string name="set_utm_parameters">Remove UTM parameters</string>
|
||||||
|
<string name="set_utm_parameters_indication">The app will automatically remove UTM parameters from URLs before visiting a link.</string>
|
||||||
</resources>
|
</resources>
|
Loading…
Reference in New Issue