diff options
author | Thomas <tschneider.ac@gmail.com> | 2023-01-13 18:07:35 +0100 |
---|---|---|
committer | Thomas <tschneider.ac@gmail.com> | 2023-01-13 18:07:35 +0100 |
commit | 447ad45fc6d0f0d08d6d82ec30f84494f4174119 (patch) | |
tree | 59a8490e9db5a7b678153412f60e5ef0e92d655f | |
parent | d3f721f7cce5947f261c4023ad86f281c0ac2a0f (diff) |
Release 3.14.33.14.3
9 files changed, 57 insertions, 15 deletions
diff --git a/app/build.gradle b/app/build.gradle index 63041b029..456658a0b 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -13,8 +13,8 @@ android { defaultConfig { minSdk 21 targetSdk 33 - versionCode 464 - versionName "3.14.2" + versionCode 465 + versionName "3.14.3" testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" } flavorDimensions "default" diff --git a/app/src/main/assets/release_notes/notes.json b/app/src/main/assets/release_notes/notes.json index c4bd320ab..1a73ed5e7 100644 --- a/app/src/main/assets/release_notes/notes.json +++ b/app/src/main/assets/release_notes/notes.json @@ -1,5 +1,10 @@ [ { + "version": "3.14.3", + "code": "465", + "note": "Added:\n- Display date of the message instead of the boost (default: disabled)\n- Allow to disable release notes popup in Settings\n\nFixed:\n- Fix timelines slow down and stuttering after some scrolls\n- Fix color issues with follow buttons\n- Fix import from settings (import from login was OK)" + }, + { "version": "3.14.2", "code": "464", "note": "Added:\n- Display familiar followers on profiles\n- Display and filter Instance directory\n\nChanged:\n- Bot and reply icon indicators more visible\n- Single media are hidden with link previews\n\nFixed:\n- Fix a crash with Art timelines\n- Friendica: media cannot be downloaded/shared\n- Fix a crash with pinned timelines" diff --git a/app/src/main/java/app/fedilab/android/helper/Helper.java b/app/src/main/java/app/fedilab/android/helper/Helper.java index e443b7869..8ee91e3a8 100644 --- a/app/src/main/java/app/fedilab/android/helper/Helper.java +++ b/app/src/main/java/app/fedilab/android/helper/Helper.java @@ -1781,6 +1781,10 @@ public class Helper { SharedPreferences sharedpreferences = PreferenceManager.getDefaultSharedPreferences(activity); int lastReleaseNoteRead = sharedpreferences.getInt(activity.getString(R.string.SET_POPUP_RELEASE_NOTES), 0); int versionCode = BuildConfig.VERSION_CODE; + boolean disabled = sharedpreferences.getBoolean(activity.getString(R.string.SET_DISABLE_RELEASE_NOTES_ALERT), false); + if (disabled && !forced) { + return; + } if (lastReleaseNoteRead != versionCode || forced) { try { InputStream is = activity.getAssets().open("release_notes/notes.json"); diff --git a/app/src/main/java/app/fedilab/android/ui/drawer/StatusAdapter.java b/app/src/main/java/app/fedilab/android/ui/drawer/StatusAdapter.java index 450473b35..c3537ab06 100644 --- a/app/src/main/java/app/fedilab/android/ui/drawer/StatusAdapter.java +++ b/app/src/main/java/app/fedilab/android/ui/drawer/StatusAdapter.java @@ -404,6 +404,7 @@ public class StatusAdapter extends RecyclerView.Adapter<RecyclerView.ViewHolder> boolean displayQuote = sharedpreferences.getBoolean(context.getString(R.string.SET_DISPLAY_QUOTES) + MainActivity.currentUserID + MainActivity.currentInstance, true); boolean displayReactions = sharedpreferences.getBoolean(context.getString(R.string.SET_DISPLAY_REACTIONS) + MainActivity.currentUserID + MainActivity.currentInstance, true); boolean compactButtons = sharedpreferences.getBoolean(context.getString(R.string.SET_DISPLAY_COMPACT_ACTION_BUTTON), false); + boolean originalDateForBoost = sharedpreferences.getBoolean(context.getString(R.string.SET_BOOST_ORIGINAL_DATE), true); if (compactButtons) { ConstraintSet set = new ConstraintSet(); @@ -1081,7 +1082,11 @@ public class StatusAdapter extends RecyclerView.Adapter<RecyclerView.ViewHolder> } else { holder.binding.editTime.setVisibility(View.GONE); } - holder.binding.time.setText(Helper.longDateToString(status.created_at)); + if (originalDateForBoost || status.reblog == null) { + holder.binding.time.setText(Helper.longDateToString(statusToDeal.created_at)); + } else { + holder.binding.time.setText(Helper.longDateToString(status.created_at)); + } holder.binding.time.setVisibility(View.VISIBLE); holder.binding.dateShort.setVisibility(View.GONE); holder.binding.visibility.setImageResource(ressource); @@ -1108,7 +1113,11 @@ public class StatusAdapter extends RecyclerView.Adapter<RecyclerView.ViewHolder> holder.binding.visibilitySmall.setVisibility(View.GONE); holder.binding.reblogsCount.setText(String.valueOf(statusToDeal.reblogs_count)); holder.binding.favoritesCount.setText(String.valueOf(statusToDeal.favourites_count)); - holder.binding.time.setText(Helper.dateDiff(context, statusToDeal.created_at)); + if (originalDateForBoost || status.reblog == null) { + holder.binding.time.setText(Helper.dateDiff(context, statusToDeal.created_at)); + } else { + holder.binding.time.setText(Helper.dateDiff(context, status.created_at)); + } if (statusToDeal.edited_at != null) { Drawable img = ContextCompat.getDrawable(context, R.drawable.ic_baseline_mode_edit_message_24); img.setBounds(0, 0, (int) (Helper.convertDpToPixel(16, context) * scale + 0.5f), (int) (Helper.convertDpToPixel(16, context) * scale + 0.5f)); @@ -1130,7 +1139,11 @@ public class StatusAdapter extends RecyclerView.Adapter<RecyclerView.ViewHolder> } else { holder.binding.dateShort.setCompoundDrawables(null, null, null, null); } - holder.binding.dateShort.setText(Helper.dateDiff(context, statusToDeal.created_at)); + if (originalDateForBoost || status.reblog == null) { + holder.binding.dateShort.setText(Helper.dateDiff(context, statusToDeal.created_at)); + } else { + holder.binding.dateShort.setText(Helper.dateDiff(context, status.created_at)); + } holder.binding.time.setVisibility(View.GONE); Helper.absoluteDateTimeReveal(context, holder.binding.dateShort, statusToDeal.created_at, statusToDeal.edited_at); } diff --git a/app/src/main/java/app/fedilab/android/ui/fragment/settings/FragmentSettingsCategories.java b/app/src/main/java/app/fedilab/android/ui/fragment/settings/FragmentSettingsCategories.java index 258e32b5a..a1f32db35 100644 --- a/app/src/main/java/app/fedilab/android/ui/fragment/settings/FragmentSettingsCategories.java +++ b/app/src/main/java/app/fedilab/android/ui/fragment/settings/FragmentSettingsCategories.java @@ -20,7 +20,6 @@ import android.content.Intent; import android.content.pm.PackageManager; import android.os.Build; import android.os.Bundle; -import android.webkit.URLUtil; import android.widget.Toast; import androidx.activity.result.ActivityResultLauncher; @@ -164,9 +163,10 @@ public class FragmentSettingsCategories extends PreferenceFragmentCompat { pref_import_settings.setOnPreferenceClickListener(preference -> { Intent openFileIntent = new Intent(Intent.ACTION_OPEN_DOCUMENT); openFileIntent.addCategory(Intent.CATEGORY_OPENABLE); - openFileIntent.setType("text/plain"); - String[] mimeTypes = new String[]{"text/plain"}; + openFileIntent.setType("application/zip"); + String[] mimeTypes = new String[]{"application/zip"}; openFileIntent.putExtra(Intent.EXTRA_MIME_TYPES, mimeTypes); + //noinspection deprecation startActivityForResult( Intent.createChooser( openFileIntent, @@ -184,13 +184,6 @@ public class FragmentSettingsCategories extends PreferenceFragmentCompat { Toasty.error(requireActivity(), getString(R.string.toot_select_file_error), Toast.LENGTH_LONG).show(); return; } - String uriFullPath = data.getData().getPath(); - String[] uriFullPathStr = uriFullPath.split(":"); - String fullPath = uriFullPath; - if (uriFullPathStr.length > 1) { - fullPath = uriFullPathStr[1]; - } - final String fileName = URLUtil.guessFileName(fullPath, null, null); Helper.createFileFromUri(requireActivity(), data.getData(), file -> ZipHelper.importData(requireActivity(), file)); } } diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index 3567f9442..8f69c1afb 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -821,6 +821,7 @@ <string name="SET_PROXY_PORT" translatable="false">SET_PROXY_PORT</string> <string name="SET_DEFAULT_LOCALE_NEW" translatable="false">SET_DEFAULT_LOCALE_NEW</string> <string name="SET_SEND_CRASH_REPORTS" translatable="false">SET_SEND_CRASH_REPORTS</string> + <string name="SET_DISABLE_RELEASE_NOTES_ALERT" translatable="false">SET_DISABLE_RELEASE_NOTES_ALERT</string> <string name="SET_DISABLE_GIF" translatable="false">SET_DISABLE_GIF</string> <string name="SET_JAVASCRIPT" translatable="false">SET_JAVASCRIPT</string> <string name="SET_CUSTOM_USER_AGENT" translatable="false">SET_CUSTOM_USER_AGENT</string> @@ -1472,6 +1473,7 @@ <string name="SET_EXCLUDED_NOTIFICATIONS_TYPE" translatable="false">SET_EXCLUDED_NOTIFICATIONS_TYPE</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_BOOST_ORIGINAL_DATE" translatable="false">SET_BOOST_ORIGINAL_DATE</string> <string name="SET_LIVE_TRANSLATE" translatable="false">SET_LIVE_TRANSLATE</string> <string name="SET_TRUNCATE_TOOTS_SIZE" translatable="false">SET_TRUNCATE_TOOTS_SIZE</string> @@ -2208,4 +2210,7 @@ <string name="set_display_compact_buttons_description">Buttons at the bottom of messages will not take the whole width</string> <string name="also_followed_by">Followed by:</string> <string name="Directory">Directory</string> + <string name="boost_original_date">Display original date for boosts</string> + <string name="set_disable_release_notes">Disable release notes</string> + <string name="set_disable_release_notes_indication">When a new version is published, you will not be alerted inside the app.</string> </resources>
\ No newline at end of file diff --git a/app/src/main/res/xml/pref_interface.xml b/app/src/main/res/xml/pref_interface.xml index da7f64c32..9d82b3f0e 100644 --- a/app/src/main/res/xml/pref_interface.xml +++ b/app/src/main/res/xml/pref_interface.xml @@ -86,6 +86,14 @@ app:summary="@string/set_enable_crash_report_indication" app:title="@string/set_enable_crash_report" /> + <SwitchPreferenceCompat + app:defaultValue="false" + app:iconSpaceReserved="false" + app:key="@string/SET_DISABLE_RELEASE_NOTES_ALERT" + app:singleLineTitle="false" + app:summary="@string/set_disable_release_notes_indication" + app:title="@string/set_disable_release_notes" /> + <androidx.preference.SeekBarPreference android:defaultValue="110" android:max="180" diff --git a/app/src/main/res/xml/pref_timelines.xml b/app/src/main/res/xml/pref_timelines.xml index f78ff5adf..a389ed08b 100644 --- a/app/src/main/res/xml/pref_timelines.xml +++ b/app/src/main/res/xml/pref_timelines.xml @@ -25,6 +25,12 @@ app:key="@string/SET_GROUP_REBLOGS" app:singleLineTitle="false" app:title="@string/group_reblogs" /> + <SwitchPreferenceCompat + android:defaultValue="true" + app:iconSpaceReserved="false" + app:key="@string/SET_BOOST_ORIGINAL_DATE" + app:singleLineTitle="false" + app:title="@string/boost_original_date" /> <ListPreference android:defaultValue="default" app:entries="@array/SET_LIVE_TRANSLATE_VALUES" diff --git a/src/fdroid/fastlane/metadata/android/en/changelogs/465.txt b/src/fdroid/fastlane/metadata/android/en/changelogs/465.txt new file mode 100644 index 000000000..c6a58cb9d --- /dev/null +++ b/src/fdroid/fastlane/metadata/android/en/changelogs/465.txt @@ -0,0 +1,8 @@ +Added: +- Display date of the message instead of the boost (default: disabled) +- Allow to disable release notes popup in Settings + +Fixed: +- Fix timelines slow down and stuttering after some scrolls +- Fix color issues with follow buttons +- Fix import from settings (import from login was OK)
\ No newline at end of file |