Loading app/build.gradle +2 −2 Original line number Diff line number Diff line Loading @@ -13,8 +13,8 @@ android { defaultConfig { minSdk 21 targetSdk 33 versionCode 458 versionName "3.13.4" versionCode 459 versionName "3.13.5" testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" } flavorDimensions "default" Loading app/src/main/assets/release_notes/notes.json +5 −0 Original line number Diff line number Diff line [ { "version": "3.13.5", "code": "459", "note": "Added:\n- Glitch: Allow to post messages locally (Can be turned off in Settings)\n\nFixed:\n- Crashes" }, { "version": "3.13.4", "code": "458", Loading app/src/main/java/app/fedilab/android/ui/drawer/ComposeAdapter.java +6 −3 Original line number Diff line number Diff line Loading @@ -1278,8 +1278,11 @@ public class ComposeAdapter extends RecyclerView.Adapter<RecyclerView.ViewHolder holder.binding.buttonEmojiOne.setVisibility(View.VISIBLE); if (extraFeatures) { boolean displayLocalOnly = sharedpreferences.getBoolean(context.getString(R.string.SET_DISPLAY_LOCAL_ONLY) + MainActivity.currentUserID + MainActivity.currentInstance, true); holder.binding.buttonTextFormat.setVisibility(View.VISIBLE); if (displayLocalOnly) { holder.binding.buttonLocalOnly.setVisibility(View.VISIBLE); } holder.binding.buttonTextFormat.setOnClickListener(v -> { AlertDialog.Builder builder = new AlertDialog.Builder(context, Helper.dialogStyle()); builder.setTitle(context.getString(R.string.post_format)); Loading Loading @@ -1313,8 +1316,8 @@ public class ComposeAdapter extends RecyclerView.Adapter<RecyclerView.ViewHolder String[] labelArr = res.getStringArray(R.array.set_local_only); int selection = 0; boolean localOnly = sharedpreferences.getBoolean(context.getString(R.string.SET_LOCAL_ONLY) + account.user_id + account.instance, false); if (statusDraft.local_only || localOnly) { int localOnly = sharedpreferences.getInt(context.getString(R.string.SET_COMPOSE_LOCAL_ONLY) + account.user_id + account.instance, 0); if (statusDraft.local_only || localOnly == 1) { selection = 1; } builder.setSingleChoiceItems(labelArr, selection, null); Loading app/src/main/java/app/fedilab/android/ui/fragment/settings/FragmentExtraFeaturesSettings.java +13 −0 Original line number Diff line number Diff line Loading @@ -76,6 +76,13 @@ public class FragmentExtraFeaturesSettings extends PreferenceFragmentCompat impl String format = sharedpreferences.getString(getString(R.string.SET_POST_FORMAT) + MainActivity.currentUserID + MainActivity.currentInstance, "text/plain"); SET_POST_FORMAT.setValue(format); } ListPreference SET_COMPOSE_LOCAL_ONLY = findPreference(getString(R.string.SET_COMPOSE_LOCAL_ONLY)); if (SET_COMPOSE_LOCAL_ONLY != null) { SET_COMPOSE_LOCAL_ONLY.getContext().setTheme(Helper.dialogStyle()); int localOnly = sharedpreferences.getInt(getString(R.string.SET_COMPOSE_LOCAL_ONLY) + MainActivity.currentUserID + MainActivity.currentInstance, 0); SET_COMPOSE_LOCAL_ONLY.setValue(String.valueOf(localOnly)); } } @Override Loading Loading @@ -119,6 +126,12 @@ public class FragmentExtraFeaturesSettings extends PreferenceFragmentCompat impl editor.putString(getString(R.string.SET_POST_FORMAT) + MainActivity.currentUserID + MainActivity.currentInstance, SET_POST_FORMAT.getValue()); } } if (key.compareToIgnoreCase(getString(R.string.SET_COMPOSE_LOCAL_ONLY)) == 0) { ListPreference SET_COMPOSE_LOCAL_ONLY = findPreference(getString(R.string.SET_COMPOSE_LOCAL_ONLY)); if (SET_COMPOSE_LOCAL_ONLY != null) { editor.putInt(getString(R.string.SET_COMPOSE_LOCAL_ONLY) + MainActivity.currentUserID + MainActivity.currentInstance, Integer.parseInt(SET_COMPOSE_LOCAL_ONLY.getValue())); } } editor.apply(); } } Loading app/src/main/res/values/strings.xml +7 −2 Original line number Diff line number Diff line Loading @@ -770,6 +770,10 @@ <item>text/x.misskeymarkdown</item> </string-array> <string-array name="SET_LOCAL_ONLY"> <item>0</item> <item>1</item> </string-array> <string-array name="set_local_only"> <item>No</item> Loading Loading @@ -1441,7 +1445,7 @@ <string name="SET_DISPLAY_TRANSLATE" translatable="false">SET_DISPLAY_TRANSLATE</string> <string name="SET_POST_FORMAT" translatable="false">SET_POST_FORMAT</string> <string name="SET_LOCAL_ONLY" translatable="false">SET_LOCAL_ONLY</string> <string name="SET_COMPOSE_LOCAL_ONLY" translatable="false">SET_COMPOSE_LOCAL_ONLY</string> <string name="SET_TRANSLATOR" translatable="false">SET_TRANSLATOR</string> <string name="SET_TRANSLATOR_VERSION" translatable="false">SET_TRANSLATOR_VERSION</string> Loading @@ -1455,7 +1459,7 @@ <string name="SET_PROFILE_REMOTELY" translatable="false">SET_PROFILE_REMOTELY</string> <string name="SET_EXTAND_EXTRA_FEATURES" translatable="false">SET_EXTAND_EXTRA_FEATURES</string> <string name="SET_DISPLAY_LOCAL_ONLY" translatable="false">SET_DISPLAY_LOCAL_ONLY</string> <string name="SET_INNER_MARKER" translatable="false">SET_INNER_MARKER</string> <string name="SET_NOTIF_SILENT" translatable="false">SET_NOTIF_SILENT</string> <string name="SET_REMEMBER_POSITION" translatable="false">SET_REMEMBER_POSITION</string> Loading Loading @@ -2194,4 +2198,5 @@ <string name="set_remote_profile_title">Remote profiles</string> <string name="set_remote_profile">The app will display publicly profiles to get all messages. Interactions will need an extra step to federate messages.</string> <string name="local_only">Local only</string> <string name="set_display_local_only">Display \"Local only\" button</string> </resources> No newline at end of file Loading
app/build.gradle +2 −2 Original line number Diff line number Diff line Loading @@ -13,8 +13,8 @@ android { defaultConfig { minSdk 21 targetSdk 33 versionCode 458 versionName "3.13.4" versionCode 459 versionName "3.13.5" testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" } flavorDimensions "default" Loading
app/src/main/assets/release_notes/notes.json +5 −0 Original line number Diff line number Diff line [ { "version": "3.13.5", "code": "459", "note": "Added:\n- Glitch: Allow to post messages locally (Can be turned off in Settings)\n\nFixed:\n- Crashes" }, { "version": "3.13.4", "code": "458", Loading
app/src/main/java/app/fedilab/android/ui/drawer/ComposeAdapter.java +6 −3 Original line number Diff line number Diff line Loading @@ -1278,8 +1278,11 @@ public class ComposeAdapter extends RecyclerView.Adapter<RecyclerView.ViewHolder holder.binding.buttonEmojiOne.setVisibility(View.VISIBLE); if (extraFeatures) { boolean displayLocalOnly = sharedpreferences.getBoolean(context.getString(R.string.SET_DISPLAY_LOCAL_ONLY) + MainActivity.currentUserID + MainActivity.currentInstance, true); holder.binding.buttonTextFormat.setVisibility(View.VISIBLE); if (displayLocalOnly) { holder.binding.buttonLocalOnly.setVisibility(View.VISIBLE); } holder.binding.buttonTextFormat.setOnClickListener(v -> { AlertDialog.Builder builder = new AlertDialog.Builder(context, Helper.dialogStyle()); builder.setTitle(context.getString(R.string.post_format)); Loading Loading @@ -1313,8 +1316,8 @@ public class ComposeAdapter extends RecyclerView.Adapter<RecyclerView.ViewHolder String[] labelArr = res.getStringArray(R.array.set_local_only); int selection = 0; boolean localOnly = sharedpreferences.getBoolean(context.getString(R.string.SET_LOCAL_ONLY) + account.user_id + account.instance, false); if (statusDraft.local_only || localOnly) { int localOnly = sharedpreferences.getInt(context.getString(R.string.SET_COMPOSE_LOCAL_ONLY) + account.user_id + account.instance, 0); if (statusDraft.local_only || localOnly == 1) { selection = 1; } builder.setSingleChoiceItems(labelArr, selection, null); Loading
app/src/main/java/app/fedilab/android/ui/fragment/settings/FragmentExtraFeaturesSettings.java +13 −0 Original line number Diff line number Diff line Loading @@ -76,6 +76,13 @@ public class FragmentExtraFeaturesSettings extends PreferenceFragmentCompat impl String format = sharedpreferences.getString(getString(R.string.SET_POST_FORMAT) + MainActivity.currentUserID + MainActivity.currentInstance, "text/plain"); SET_POST_FORMAT.setValue(format); } ListPreference SET_COMPOSE_LOCAL_ONLY = findPreference(getString(R.string.SET_COMPOSE_LOCAL_ONLY)); if (SET_COMPOSE_LOCAL_ONLY != null) { SET_COMPOSE_LOCAL_ONLY.getContext().setTheme(Helper.dialogStyle()); int localOnly = sharedpreferences.getInt(getString(R.string.SET_COMPOSE_LOCAL_ONLY) + MainActivity.currentUserID + MainActivity.currentInstance, 0); SET_COMPOSE_LOCAL_ONLY.setValue(String.valueOf(localOnly)); } } @Override Loading Loading @@ -119,6 +126,12 @@ public class FragmentExtraFeaturesSettings extends PreferenceFragmentCompat impl editor.putString(getString(R.string.SET_POST_FORMAT) + MainActivity.currentUserID + MainActivity.currentInstance, SET_POST_FORMAT.getValue()); } } if (key.compareToIgnoreCase(getString(R.string.SET_COMPOSE_LOCAL_ONLY)) == 0) { ListPreference SET_COMPOSE_LOCAL_ONLY = findPreference(getString(R.string.SET_COMPOSE_LOCAL_ONLY)); if (SET_COMPOSE_LOCAL_ONLY != null) { editor.putInt(getString(R.string.SET_COMPOSE_LOCAL_ONLY) + MainActivity.currentUserID + MainActivity.currentInstance, Integer.parseInt(SET_COMPOSE_LOCAL_ONLY.getValue())); } } editor.apply(); } } Loading
app/src/main/res/values/strings.xml +7 −2 Original line number Diff line number Diff line Loading @@ -770,6 +770,10 @@ <item>text/x.misskeymarkdown</item> </string-array> <string-array name="SET_LOCAL_ONLY"> <item>0</item> <item>1</item> </string-array> <string-array name="set_local_only"> <item>No</item> Loading Loading @@ -1441,7 +1445,7 @@ <string name="SET_DISPLAY_TRANSLATE" translatable="false">SET_DISPLAY_TRANSLATE</string> <string name="SET_POST_FORMAT" translatable="false">SET_POST_FORMAT</string> <string name="SET_LOCAL_ONLY" translatable="false">SET_LOCAL_ONLY</string> <string name="SET_COMPOSE_LOCAL_ONLY" translatable="false">SET_COMPOSE_LOCAL_ONLY</string> <string name="SET_TRANSLATOR" translatable="false">SET_TRANSLATOR</string> <string name="SET_TRANSLATOR_VERSION" translatable="false">SET_TRANSLATOR_VERSION</string> Loading @@ -1455,7 +1459,7 @@ <string name="SET_PROFILE_REMOTELY" translatable="false">SET_PROFILE_REMOTELY</string> <string name="SET_EXTAND_EXTRA_FEATURES" translatable="false">SET_EXTAND_EXTRA_FEATURES</string> <string name="SET_DISPLAY_LOCAL_ONLY" translatable="false">SET_DISPLAY_LOCAL_ONLY</string> <string name="SET_INNER_MARKER" translatable="false">SET_INNER_MARKER</string> <string name="SET_NOTIF_SILENT" translatable="false">SET_NOTIF_SILENT</string> <string name="SET_REMEMBER_POSITION" translatable="false">SET_REMEMBER_POSITION</string> Loading Loading @@ -2194,4 +2198,5 @@ <string name="set_remote_profile_title">Remote profiles</string> <string name="set_remote_profile">The app will display publicly profiles to get all messages. Interactions will need an extra step to federate messages.</string> <string name="local_only">Local only</string> <string name="set_display_local_only">Display \"Local only\" button</string> </resources> No newline at end of file