Improvements for Pleroma/Akkoma (#445)

* Reply Visibility on Plemora

* Sort statuses in thread

* Get default visibility and language from account if preferences fail

* Fix for Mentions tab in notifications on Pleroma

* Mark status as sensitive if not already when spoilertext is present

* Integrating Pleroma quoting for new posts

* move string to strings_sk

* use null instead of empty string

* change string

* fix crash due to null value

* update string

---------

Co-authored-by: sk <sk22@mailbox.org>
This commit is contained in:
Jacoco
2023-03-16 00:49:11 +01:00
committed by GitHub
parent 374626cb32
commit f852dac1e5
13 changed files with 184 additions and 39 deletions

View File

@@ -57,6 +57,11 @@ public class GlobalUserPreferences{
public static Set<String> accountsWithLocalOnlySupport;
public static Set<String> accountsInGlitchMode;
/**
* Pleroma
*/
public static String replyVisibility;
private static SharedPreferences getPrefs(){
return MastodonApp.context.getSharedPreferences("global", Context.MODE_PRIVATE);
}
@@ -103,6 +108,7 @@ public class GlobalUserPreferences{
pinnedTimelines=fromJson(prefs.getString("pinnedTimelines", null), pinnedTimelinesType, new HashMap<>());
accountsWithLocalOnlySupport=prefs.getStringSet("accountsWithLocalOnlySupport", new HashSet<>());
accountsInGlitchMode=prefs.getStringSet("accountsInGlitchMode", new HashSet<>());
replyVisibility=prefs.getString("replyVisibility", null);
try {
color=ColorPreference.valueOf(prefs.getString("color", ColorPreference.PINK.name()));
@@ -148,6 +154,7 @@ public class GlobalUserPreferences{
.putString("pinnedTimelines", gson.toJson(pinnedTimelines))
.putStringSet("accountsWithLocalOnlySupport", accountsWithLocalOnlySupport)
.putStringSet("accountsInGlitchMode", accountsInGlitchMode)
.putString("replyVisibility", replyVisibility)
.apply();
}