Browse Source

Suppressed Uploads in Settings

pull/61/merge
Ezerous 6 years ago
parent
commit
221ff50920
No known key found for this signature in database GPG Key ID: 262B2954BBA319E3
  1. 2
      app/src/main/java/gr/thmmy/mthmmy/activities/create_content/NewTopicTask.java
  2. 8
      app/src/main/java/gr/thmmy/mthmmy/activities/settings/SettingsFragment.java
  3. 2
      app/src/main/java/gr/thmmy/mthmmy/activities/topic/tasks/ReplyTask.java
  4. 4
      app/src/main/res/xml/app_preferences.xml

2
app/src/main/java/gr/thmmy/mthmmy/activities/create_content/NewTopicTask.java

@ -52,7 +52,7 @@ public class NewTopicTask extends AsyncTask<String, Void, Boolean> {
createTopicUrl = document.select("form").first().attr("action"); createTopicUrl = document.select("form").first().attr("action");
final String appSignature = "\n[right][size=7pt][i]sent from [url=https://play.google.com/store/apps/" + final String appSignature = "\n[right][size=7pt][i]sent from [url=https://play.google.com/store/apps/" +
"details?id=gr.thmmy.mthmmy]mTHMMY[/url][/i][/size][/right]"; "details?id=gr.thmmy.mthmmy]mTHMMY[/url] [/i][/size][/right]";
RequestBody postBody = new MultipartBody.Builder() RequestBody postBody = new MultipartBody.Builder()
.setType(MultipartBody.FORM) .setType(MultipartBody.FORM)

8
app/src/main/java/gr/thmmy/mthmmy/activities/settings/SettingsFragment.java

@ -96,8 +96,8 @@ public class SettingsFragment extends PreferenceFragmentCompat implements Shared
findPreference(POSTING_CATEGORY).setVisible(isLoggedIn); findPreference(POSTING_CATEGORY).setVisible(isLoggedIn);
findPreference(POSTING_APP_SIGNATURE_ENABLE_KEY).setVisible(isLoggedIn); findPreference(POSTING_APP_SIGNATURE_ENABLE_KEY).setVisible(isLoggedIn);
findPreference(UPLOADING_CATEGORY).setVisible(isLoggedIn); //findPreference(UPLOADING_CATEGORY).setVisible(isLoggedIn);
findPreference(UPLOADING_APP_SIGNATURE_ENABLE_KEY).setVisible(isLoggedIn); //findPreference(UPLOADING_APP_SIGNATURE_ENABLE_KEY).setVisible(isLoggedIn);
if (!isLoggedIn && defaultHomeTabEntries.contains("Unread")) { if (!isLoggedIn && defaultHomeTabEntries.contains("Unread")) {
defaultHomeTabEntries.remove("Unread"); defaultHomeTabEntries.remove("Unread");
@ -171,8 +171,8 @@ public class SettingsFragment extends PreferenceFragmentCompat implements Shared
findPreference(POSTING_CATEGORY).setVisible(isLoggedIn); findPreference(POSTING_CATEGORY).setVisible(isLoggedIn);
findPreference(POSTING_APP_SIGNATURE_ENABLE_KEY).setVisible(isLoggedIn); findPreference(POSTING_APP_SIGNATURE_ENABLE_KEY).setVisible(isLoggedIn);
findPreference(UPLOADING_CATEGORY).setVisible(isLoggedIn); //findPreference(UPLOADING_CATEGORY).setVisible(isLoggedIn);
findPreference(UPLOADING_APP_SIGNATURE_ENABLE_KEY).setVisible(isLoggedIn); //findPreference(UPLOADING_APP_SIGNATURE_ENABLE_KEY).setVisible(isLoggedIn);
if (!isLoggedIn && defaultHomeTabEntries.contains("Unread")) { if (!isLoggedIn && defaultHomeTabEntries.contains("Unread")) {
defaultHomeTabEntries.remove("Unread"); defaultHomeTabEntries.remove("Unread");

2
app/src/main/java/gr/thmmy/mthmmy/activities/topic/tasks/ReplyTask.java

@ -32,7 +32,7 @@ public class ReplyTask extends AsyncTask<String, Void, Posting.REPLY_STATUS> {
@Override @Override
protected Posting.REPLY_STATUS doInBackground(String... args) { protected Posting.REPLY_STATUS doInBackground(String... args) {
final String sentFrommTHMMY = includeAppSignature final String sentFrommTHMMY = includeAppSignature
? "\n[right][size=7pt][i]sent from [url=https://play.google.com/store/apps/details?id=gr.thmmy.mthmmy]mTHMMY[/url][/i][/size][/right]" ? "\n[right][size=7pt][i]sent from [url=https://play.google.com/store/apps/details?id=gr.thmmy.mthmmy]mTHMMY[/url] [/i][/size][/right]"
: ""; : "";
RequestBody postBody = new MultipartBody.Builder() RequestBody postBody = new MultipartBody.Builder()
.setType(MultipartBody.FORM) .setType(MultipartBody.FORM)

4
app/src/main/res/xml/app_preferences.xml

@ -38,7 +38,7 @@
android:summary="@string/pref_summary_posting_app_signature_enable" /> android:summary="@string/pref_summary_posting_app_signature_enable" />
</android.support.v7.preference.PreferenceCategory> </android.support.v7.preference.PreferenceCategory>
<android.support.v7.preference.PreferenceCategory <!--<android.support.v7.preference.PreferenceCategory
android:key="pref_category_uploading_key" android:key="pref_category_uploading_key"
android:title="@string/pref_category_uploading"> android:title="@string/pref_category_uploading">
<android.support.v7.preference.SwitchPreferenceCompat <android.support.v7.preference.SwitchPreferenceCompat
@ -46,7 +46,7 @@
android:key="pref_uploading_app_signature_enable_key" android:key="pref_uploading_app_signature_enable_key"
android:title="@string/pref_title_uploading_app_signature_enable" android:title="@string/pref_title_uploading_app_signature_enable"
android:summary="@string/pref_summary_uploading_app_signature_enable" /> android:summary="@string/pref_summary_uploading_app_signature_enable" />
</android.support.v7.preference.PreferenceCategory> </android.support.v7.preference.PreferenceCategory>-->
<android.support.v7.preference.PreferenceCategory <android.support.v7.preference.PreferenceCategory
android:key="pref_category_privacy_key" android:key="pref_category_privacy_key"

Loading…
Cancel
Save