Release 3.19.0

inspect_home_cache 3.19.0
Thomas 2 years ago
parent b9af6ee60b
commit b981d2899e

@ -13,8 +13,8 @@ android {
defaultConfig { defaultConfig {
minSdk 21 minSdk 21
targetSdk 33 targetSdk 33
versionCode 480 versionCode 481
versionName "3.18.2" versionName "3.19.0"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
} }
flavorDimensions "default" flavorDimensions "default"

@ -1,4 +1,9 @@
[ [
{
"version": "3.19.0",
"code": "481",
"note": "Added:\n- Settings compose: don't send media if there are no description (default: disabled)\n- Settings Timelines: Enable/Disable truncate links\n- Allow to set max link length (20 - 150 chars)\n\nChanged:\n- Align media with text (left margin enabled)\n\nFixed:\n- Media previews remain the same when sharing\n- Edit media description not working\n- Accessibility (larger fonts): profiles/DM\n- Cross replies: Wrong visibility with the selected account\n- Several crashes"
},
{ {
"version": "3.18.2", "version": "3.18.2",
"code": "480", "code": "480",

@ -303,11 +303,16 @@ public class SpannableHelper {
end = start + newUrl.length(); end = start + newUrl.length();
url = newUrl; url = newUrl;
} }
if (url.length() > 30 && (validUrl || url.startsWith("gimini://"))) { SharedPreferences sharedpreferences = PreferenceManager.getDefaultSharedPreferences(context);
newUrl = url.substring(0, 30); boolean truncate = sharedpreferences.getBoolean(context.getString(R.string.SET_TRUNCATE_LINKS), true);
if (truncate) {
int truncateValue = sharedpreferences.getInt(context.getString(R.string.SET_TRUNCATE_LINKS_MAX), 30);
if (url.length() > truncateValue && (validUrl || url.startsWith("gimini://"))) {
newUrl = url.substring(0, truncateValue);
newUrl += "…"; newUrl += "…";
content.replace(start, end, newUrl); content.replace(start, end, newUrl);
} }
}
int matchEnd = validUrl ? start + newUrl.length() : end; int matchEnd = validUrl ? start + newUrl.length() : end;
String finalUrl = url; String finalUrl = url;

@ -61,6 +61,7 @@ public class FragmentTimelinesSettings extends PreferenceFragmentCompat implemen
preferenceScreen.removePreferenceRecursively("SET_TRANSLATOR_DOMAIN"); preferenceScreen.removePreferenceRecursively("SET_TRANSLATOR_DOMAIN");
} }
} }
SwitchPreferenceCompat SET_DISPLAY_BOOKMARK = findPreference(getString(R.string.SET_DISPLAY_BOOKMARK)); SwitchPreferenceCompat SET_DISPLAY_BOOKMARK = findPreference(getString(R.string.SET_DISPLAY_BOOKMARK));
if (SET_DISPLAY_BOOKMARK != null) { if (SET_DISPLAY_BOOKMARK != null) {
boolean checked = sharedpreferences.getBoolean(getString(R.string.SET_DISPLAY_BOOKMARK) + MainActivity.currentUserID + MainActivity.currentInstance, true); boolean checked = sharedpreferences.getBoolean(getString(R.string.SET_DISPLAY_BOOKMARK) + MainActivity.currentUserID + MainActivity.currentInstance, true);
@ -77,6 +78,7 @@ public class FragmentTimelinesSettings extends PreferenceFragmentCompat implemen
boolean checked = sharedpreferences.getBoolean(getString(R.string.SET_PIXELFED_PRESENTATION) + MainActivity.currentUserID + MainActivity.currentInstance, false); boolean checked = sharedpreferences.getBoolean(getString(R.string.SET_PIXELFED_PRESENTATION) + MainActivity.currentUserID + MainActivity.currentInstance, false);
SET_PIXELFED_PRESENTATION.setChecked(checked); SET_PIXELFED_PRESENTATION.setChecked(checked);
} }
} }
@Override @Override

@ -1125,6 +1125,9 @@
<string name="SET_EXPAND_MEDIA" translatable="false">SET_EXPAND_MEDIA</string> <string name="SET_EXPAND_MEDIA" translatable="false">SET_EXPAND_MEDIA</string>
<string name="SET_GROUP_REBLOGS" translatable="false">SET_GROUP_REBLOGS</string> <string name="SET_GROUP_REBLOGS" translatable="false">SET_GROUP_REBLOGS</string>
<string name="SET_BOOST_ORIGINAL_DATE" translatable="false">SET_BOOST_ORIGINAL_DATE</string> <string name="SET_BOOST_ORIGINAL_DATE" translatable="false">SET_BOOST_ORIGINAL_DATE</string>
<string name="SET_TRUNCATE_LINKS" translatable="false">SET_TRUNCATE_LINKS</string>
<string name="SET_TRUNCATE_LINKS_MAX" translatable="false">SET_TRUNCATE_LINKS_MAX</string>
<string name="SET_HIDE_SINGLE_MEDIA_WITH_CARD" translatable="false">SET_HIDE_SINGLE_MEDIA_WITH_CARD</string> <string name="SET_HIDE_SINGLE_MEDIA_WITH_CARD" translatable="false">SET_HIDE_SINGLE_MEDIA_WITH_CARD</string>
<string name="SET_LIVE_TRANSLATE_MULTIPLE" translatable="false">SET_LIVE_TRANSLATE_MULTIPLE</string> <string name="SET_LIVE_TRANSLATE_MULTIPLE" translatable="false">SET_LIVE_TRANSLATE_MULTIPLE</string>
<string name="SET_TRUNCATE_TOOTS_SIZE" translatable="false">SET_TRUNCATE_TOOTS_SIZE</string> <string name="SET_TRUNCATE_TOOTS_SIZE" translatable="false">SET_TRUNCATE_TOOTS_SIZE</string>
@ -1910,4 +1913,7 @@
<string name="set_alt_text_mandatory_description">The message will not be sent if a description is missing with a media</string> <string name="set_alt_text_mandatory_description">The message will not be sent if a description is missing with a media</string>
<string name="toot_error_no_media_description">There are missing media descriptions</string> <string name="toot_error_no_media_description">There are missing media descriptions</string>
<string name="truncate_links">Truncate links</string>
<string name="truncate_links_max">Max chars in links</string>
</resources> </resources>

@ -44,6 +44,23 @@
app:singleLineTitle="false" app:singleLineTitle="false"
app:title="@string/boost_original_date" /> app:title="@string/boost_original_date" />
<SwitchPreferenceCompat
android:defaultValue="true"
app:iconSpaceReserved="false"
app:key="@string/SET_TRUNCATE_LINKS"
app:singleLineTitle="false"
app:title="@string/truncate_links" />
<androidx.preference.SeekBarPreference
android:defaultValue="30"
android:max="150"
app:dependency="@string/SET_TRUNCATE_LINKS"
app:iconSpaceReserved="false"
app:key="@string/SET_TRUNCATE_LINKS_MAX"
app:min="20"
app:showSeekBarValue="true"
app:singleLineTitle="false"
app:title="@string/truncate_links_max" />
<SwitchPreferenceCompat <SwitchPreferenceCompat
android:defaultValue="false" android:defaultValue="false"
app:iconSpaceReserved="false" app:iconSpaceReserved="false"
@ -205,6 +222,7 @@
<androidx.preference.SeekBarPreference <androidx.preference.SeekBarPreference
android:defaultValue="40" android:defaultValue="40"
app:min="10"
android:max="80" android:max="80"
app:iconSpaceReserved="false" app:iconSpaceReserved="false"
app:key="@string/SET_STATUSES_PER_CALL" app:key="@string/SET_STATUSES_PER_CALL"
@ -213,6 +231,7 @@
<androidx.preference.SeekBarPreference <androidx.preference.SeekBarPreference
android:defaultValue="40" android:defaultValue="40"
app:min="10"
android:max="80" android:max="80"
app:iconSpaceReserved="false" app:iconSpaceReserved="false"
app:key="@string/SET_ACCOUNTS_PER_CALL" app:key="@string/SET_ACCOUNTS_PER_CALL"
@ -221,6 +240,7 @@
<androidx.preference.SeekBarPreference <androidx.preference.SeekBarPreference
android:defaultValue="30" android:defaultValue="30"
app:min="10"
android:max="30" android:max="30"
app:iconSpaceReserved="false" app:iconSpaceReserved="false"
app:key="@string/SET_NOTIFICATIONS_PER_CALL" app:key="@string/SET_NOTIFICATIONS_PER_CALL"

@ -1,5 +1,7 @@
Added: Added:
- Settings compose: don't send media if there are no description (default: disabled) - Settings compose: don't send media if there are no description (default: disabled)
- Settings Timelines: Enable/Disable truncate links
- Allow to set max link length (20 - 150 chars)
Changed: Changed:
- Align media with text (left margin enabled) - Align media with text (left margin enabled)
@ -7,6 +9,6 @@ Changed:
Fixed: Fixed:
- Media previews remain the same when sharing - Media previews remain the same when sharing
- Edit media description not working - Edit media description not working
- Accessibility (larger fonts): profiles/DM/ - Accessibility (larger fonts): profiles/DM
- Cross replies: Wrong visibility with the selected account - Cross replies: Wrong visibility with the selected account
- Several crashes - Several crashes
Loading…
Cancel
Save