forked from mirrors/Fedilab
		
	Release 3.13.5
This commit is contained in:
		
							parent
							
								
									da2ce8bce4
								
							
						
					
					
						commit
						537bb3f622
					
				
					 7 changed files with 55 additions and 7 deletions
				
			
		| 
						 | 
					@ -13,8 +13,8 @@ android {
 | 
				
			||||||
    defaultConfig {
 | 
					    defaultConfig {
 | 
				
			||||||
        minSdk 21
 | 
					        minSdk 21
 | 
				
			||||||
        targetSdk 33
 | 
					        targetSdk 33
 | 
				
			||||||
        versionCode 458
 | 
					        versionCode 459
 | 
				
			||||||
        versionName "3.13.4"
 | 
					        versionName "3.13.5"
 | 
				
			||||||
        testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
 | 
					        testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
    flavorDimensions "default"
 | 
					    flavorDimensions "default"
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -1,4 +1,9 @@
 | 
				
			||||||
[
 | 
					[
 | 
				
			||||||
 | 
					  {
 | 
				
			||||||
 | 
					    "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",
 | 
					    "version": "3.13.4",
 | 
				
			||||||
    "code": "458",
 | 
					    "code": "458",
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -1278,8 +1278,11 @@ public class ComposeAdapter extends RecyclerView.Adapter<RecyclerView.ViewHolder
 | 
				
			||||||
 | 
					
 | 
				
			||||||
            holder.binding.buttonEmojiOne.setVisibility(View.VISIBLE);
 | 
					            holder.binding.buttonEmojiOne.setVisibility(View.VISIBLE);
 | 
				
			||||||
            if (extraFeatures) {
 | 
					            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);
 | 
					                holder.binding.buttonTextFormat.setVisibility(View.VISIBLE);
 | 
				
			||||||
 | 
					                if (displayLocalOnly) {
 | 
				
			||||||
                    holder.binding.buttonLocalOnly.setVisibility(View.VISIBLE);
 | 
					                    holder.binding.buttonLocalOnly.setVisibility(View.VISIBLE);
 | 
				
			||||||
 | 
					                }
 | 
				
			||||||
                holder.binding.buttonTextFormat.setOnClickListener(v -> {
 | 
					                holder.binding.buttonTextFormat.setOnClickListener(v -> {
 | 
				
			||||||
                    AlertDialog.Builder builder = new AlertDialog.Builder(context, Helper.dialogStyle());
 | 
					                    AlertDialog.Builder builder = new AlertDialog.Builder(context, Helper.dialogStyle());
 | 
				
			||||||
                    builder.setTitle(context.getString(R.string.post_format));
 | 
					                    builder.setTitle(context.getString(R.string.post_format));
 | 
				
			||||||
| 
						 | 
					@ -1313,8 +1316,8 @@ public class ComposeAdapter extends RecyclerView.Adapter<RecyclerView.ViewHolder
 | 
				
			||||||
                    String[] labelArr = res.getStringArray(R.array.set_local_only);
 | 
					                    String[] labelArr = res.getStringArray(R.array.set_local_only);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
                    int selection = 0;
 | 
					                    int selection = 0;
 | 
				
			||||||
                    boolean localOnly = sharedpreferences.getBoolean(context.getString(R.string.SET_LOCAL_ONLY) + account.user_id + account.instance, false);
 | 
					                    int localOnly = sharedpreferences.getInt(context.getString(R.string.SET_COMPOSE_LOCAL_ONLY) + account.user_id + account.instance, 0);
 | 
				
			||||||
                    if (statusDraft.local_only || localOnly) {
 | 
					                    if (statusDraft.local_only || localOnly == 1) {
 | 
				
			||||||
                        selection = 1;
 | 
					                        selection = 1;
 | 
				
			||||||
                    }
 | 
					                    }
 | 
				
			||||||
                    builder.setSingleChoiceItems(labelArr, selection, null);
 | 
					                    builder.setSingleChoiceItems(labelArr, selection, null);
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -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");
 | 
					            String format = sharedpreferences.getString(getString(R.string.SET_POST_FORMAT) + MainActivity.currentUserID + MainActivity.currentInstance, "text/plain");
 | 
				
			||||||
            SET_POST_FORMAT.setValue(format);
 | 
					            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
 | 
					    @Override
 | 
				
			||||||
| 
						 | 
					@ -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());
 | 
					                    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();
 | 
					            editor.apply();
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -770,6 +770,10 @@
 | 
				
			||||||
        <item>text/x.misskeymarkdown</item>
 | 
					        <item>text/x.misskeymarkdown</item>
 | 
				
			||||||
    </string-array>
 | 
					    </string-array>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    <string-array name="SET_LOCAL_ONLY">
 | 
				
			||||||
 | 
					        <item>0</item>
 | 
				
			||||||
 | 
					        <item>1</item>
 | 
				
			||||||
 | 
					    </string-array>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    <string-array name="set_local_only">
 | 
					    <string-array name="set_local_only">
 | 
				
			||||||
        <item>No</item>
 | 
					        <item>No</item>
 | 
				
			||||||
| 
						 | 
					@ -1441,7 +1445,7 @@
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    <string name="SET_DISPLAY_TRANSLATE" translatable="false">SET_DISPLAY_TRANSLATE</string>
 | 
					    <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_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" translatable="false">SET_TRANSLATOR</string>
 | 
				
			||||||
    <string name="SET_TRANSLATOR_VERSION" translatable="false">SET_TRANSLATOR_VERSION</string>
 | 
					    <string name="SET_TRANSLATOR_VERSION" translatable="false">SET_TRANSLATOR_VERSION</string>
 | 
				
			||||||
| 
						 | 
					@ -1455,7 +1459,7 @@
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    <string name="SET_PROFILE_REMOTELY" translatable="false">SET_PROFILE_REMOTELY</string>
 | 
					    <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_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_INNER_MARKER" translatable="false">SET_INNER_MARKER</string>
 | 
				
			||||||
    <string name="SET_NOTIF_SILENT" translatable="false">SET_NOTIF_SILENT</string>
 | 
					    <string name="SET_NOTIF_SILENT" translatable="false">SET_NOTIF_SILENT</string>
 | 
				
			||||||
    <string name="SET_REMEMBER_POSITION" translatable="false">SET_REMEMBER_POSITION</string>
 | 
					    <string name="SET_REMEMBER_POSITION" translatable="false">SET_REMEMBER_POSITION</string>
 | 
				
			||||||
| 
						 | 
					@ -2194,4 +2198,5 @@
 | 
				
			||||||
    <string name="set_remote_profile_title">Remote profiles</string>
 | 
					    <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="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="local_only">Local only</string>
 | 
				
			||||||
 | 
					    <string name="set_display_local_only">Display \"Local only\" button</string>
 | 
				
			||||||
</resources>
 | 
					</resources>
 | 
				
			||||||
| 
						 | 
					@ -47,6 +47,12 @@
 | 
				
			||||||
            app:key="@string/SET_DISPLAY_REACTIONS"
 | 
					            app:key="@string/SET_DISPLAY_REACTIONS"
 | 
				
			||||||
            app:singleLineTitle="false"
 | 
					            app:singleLineTitle="false"
 | 
				
			||||||
            app:title="@string/set_display_reaction_indication" />
 | 
					            app:title="@string/set_display_reaction_indication" />
 | 
				
			||||||
 | 
					        <SwitchPreferenceCompat
 | 
				
			||||||
 | 
					            android:defaultValue="true"
 | 
				
			||||||
 | 
					            app:iconSpaceReserved="false"
 | 
				
			||||||
 | 
					            app:key="@string/SET_DISPLAY_LOCAL_ONLY"
 | 
				
			||||||
 | 
					            app:singleLineTitle="false"
 | 
				
			||||||
 | 
					            app:title="@string/set_display_local_only" />
 | 
				
			||||||
    </app.fedilab.android.helper.settings.LongSummaryPreferenceCategory>
 | 
					    </app.fedilab.android.helper.settings.LongSummaryPreferenceCategory>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    <ListPreference
 | 
					    <ListPreference
 | 
				
			||||||
| 
						 | 
					@ -61,4 +67,15 @@
 | 
				
			||||||
        app:title="@string/set_post_format"
 | 
					        app:title="@string/set_post_format"
 | 
				
			||||||
        app:useSimpleSummaryProvider="true" />
 | 
					        app:useSimpleSummaryProvider="true" />
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    <ListPreference
 | 
				
			||||||
 | 
					        app:defaultValue="0"
 | 
				
			||||||
 | 
					        app:dependency="@string/SET_EXTAND_EXTRA_FEATURES"
 | 
				
			||||||
 | 
					        app:dialogTitle="@string/local_only"
 | 
				
			||||||
 | 
					        app:entries="@array/set_local_only"
 | 
				
			||||||
 | 
					        app:entryValues="@array/SET_LOCAL_ONLY"
 | 
				
			||||||
 | 
					        app:iconSpaceReserved="false"
 | 
				
			||||||
 | 
					        app:key="@string/SET_COMPOSE_LOCAL_ONLY"
 | 
				
			||||||
 | 
					        app:title="@string/local_only"
 | 
				
			||||||
 | 
					        app:useSimpleSummaryProvider="true" />
 | 
				
			||||||
 | 
					
 | 
				
			||||||
</androidx.preference.PreferenceScreen>
 | 
					</androidx.preference.PreferenceScreen>
 | 
				
			||||||
| 
						 | 
					@ -0,0 +1,5 @@
 | 
				
			||||||
 | 
					Added:
 | 
				
			||||||
 | 
					- Glitch: Allow to post messages locally (Can be turned off in Settings)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					Fixed:
 | 
				
			||||||
 | 
					- Crashes
 | 
				
			||||||
		Loading…
	
		Reference in a new issue