From 2fc5669203a83e02da808e9342c79c6163c0dc6a Mon Sep 17 00:00:00 2001 From: dontobi Date: Thu, 5 Jan 2023 18:53:12 +0100 Subject: [PATCH 01/11] Update german translation --- .../src/main/res/values-de-rDE/strings_sk.xml | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/mastodon/src/main/res/values-de-rDE/strings_sk.xml b/mastodon/src/main/res/values-de-rDE/strings_sk.xml index 1af340463..619e6f41c 100644 --- a/mastodon/src/main/res/values-de-rDE/strings_sk.xml +++ b/mastodon/src/main/res/values-de-rDE/strings_sk.xml @@ -4,14 +4,14 @@ Angeheftet Löschen und neu erstellen Beitrag löschen und neu erstellen - Bist du dir sicher, dass du diesen Beitrag löschen und neu erstellen möchtest? + Bist du dir sicher, dass du diesen Beitrag löschen und neu erstellen möchtest\? An Profil anheften Beitrag an Profil anheften Möchtest du den Beitrag an dein Profil anheften? Wird angeheftet… Von Profil lösen Angehefteten Beitrag von Profil lösen - Bist du dir sicher, dass du den angehefteten Beitrag von deinem Profil lösen möchtest? + Bist du dir sicher, dass du den angehefteten Beitrag von deinem Profil lösen möchtest\? Wird vom Profil gelöst… Bildbeschreibung Nicht gelistet @@ -37,7 +37,7 @@ Listen mit %s Inhaltswarnungen immer ausklappen Laufschrift in Titelleisten deaktivieren - Tröt Trennung deaktivieren + Beitrags-​Benachrichtigungen Trennung deaktivieren Veröffentlichen Schaltfläche verschieben Zu Moshidon beitragen Föderierte Timeline anzeigen @@ -75,10 +75,10 @@ Spenden Benachrichtigung löschen Benachrichtigung löschen - Benachrichtigung wirklich löschen? + Benachrichtigung wirklich löschen\? Alle Benachrichtigungen löschen Alle löschen - Wirklich alle Benachrichtigungen löschen? + Wirklich alle Benachrichtigungen löschen\? Löschen von Benachrichtigungen aktivieren Veröffentlichen-Button-Text Veröffentlichen-Button-Text anpassen @@ -111,9 +111,9 @@ Entwurf Planen Entwurf löschen - Möchtest du diesen entworfenen Beitrag wirklich löschen? + Möchtest du diesen entworfenen Beitrag wirklich löschen\? Geplanten Beitrag löschen - Möchtest du diesen geplanten Beitrag wirklich löschen? + Möchtest du diesen geplanten Beitrag wirklich löschen\? Entwurf oder Planen Beitrag wird als Entwurf gespeichert. Geplant für @@ -134,4 +134,5 @@ Die enthaltenen Bilder haben keine Beschreibung. Bitte füge eine Beschreibung hinzu, damit auch sehbehinderte Personen teilnehmen können. Kürzlich verwendet Kürzlich verwendete Emojis löschen + Deaktiviere die Funktion "Veröffentlichen Schaltfläche verschieben", um eine Anpassung zu ermöglichen. \ No newline at end of file From 58f79e06efd6fbc14d5e3ec6f3c4d9dc7cdc3ab9 Mon Sep 17 00:00:00 2001 From: LucasGGamerM Date: Thu, 5 Jan 2023 21:16:03 -0300 Subject: [PATCH 02/11] Idk what these are, but testing commits --- .github/ISSUE_TEMPLATE/bug_report.md | 32 ++++++++++++++++++++ .github/ISSUE_TEMPLATE/feature-ui-request.md | 20 ++++++++++++ .github/ISSUE_TEMPLATE/something-else.md | 10 ++++++ 3 files changed, 62 insertions(+) create mode 100644 .github/ISSUE_TEMPLATE/bug_report.md create mode 100644 .github/ISSUE_TEMPLATE/feature-ui-request.md create mode 100644 .github/ISSUE_TEMPLATE/something-else.md diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md new file mode 100644 index 000000000..d3b8a94b0 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -0,0 +1,32 @@ +--- +name: Bug report +about: Create a report to help us improve +title: '' +labels: bug +assignees: '' + +--- + +**Describe the bug** +A clear and concise description of what the bug is. + +**To Reproduce** +Steps to reproduce the behavior: +1. Go to '...' +2. Click on '....' +3. Scroll down to '....' +4. See error + +**Screenshots and screen recordings** +If applicable, add screenshots (and screen recordings, if possible) to help explain your problem. + +**Version** +Megalodon version: [e.g. v1.1.4+fork.#] + +**Additional context** +- Does this issue also occur with the respective upstream release? (Please test using the respective `upstream-xxxxxx.apk` provided in [Releases](https://github.com/sk22/megalodon/releases)) No / Yes (`mastodon#…`) + + > In this case, please consider filing an [upstream bug report](https://github.com/mastodon/mastodon-android/issues) instead. If this bug is seriously impacting your usage or you think I might want to try to fix it for Megalodon, feel free to still create this issue! + +**Crash log** +If you know your way around Android development tools, please consider attaching a crash log, if possible. diff --git a/.github/ISSUE_TEMPLATE/feature-ui-request.md b/.github/ISSUE_TEMPLATE/feature-ui-request.md new file mode 100644 index 000000000..7a56c359a --- /dev/null +++ b/.github/ISSUE_TEMPLATE/feature-ui-request.md @@ -0,0 +1,20 @@ +--- +name: Feature/UI request +about: Suggest an idea for this project +title: '' +labels: feature +assignees: '' + +--- + +**Is your feature request related to a problem? Please describe.** +A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] + +**Describe the solution you'd like** +A clear and concise description of what you want to happen. + +**Describe alternatives you've considered** +If applicable: a clear and concise description of any alternative solutions or features you've considered. + +**Additional context** +Add any other context or screenshots about the feature request here. diff --git a/.github/ISSUE_TEMPLATE/something-else.md b/.github/ISSUE_TEMPLATE/something-else.md new file mode 100644 index 000000000..995600f1e --- /dev/null +++ b/.github/ISSUE_TEMPLATE/something-else.md @@ -0,0 +1,10 @@ +--- +name: It's something else… +about: Issues that can't be categorized as feature requests or bug reports +title: '' +labels: '' +assignees: '' + +--- + + From a996a24b7fa37048a70f4cbaa6486550b767c79b Mon Sep 17 00:00:00 2001 From: Tobias S Date: Fri, 6 Jan 2023 06:22:25 +0100 Subject: [PATCH 03/11] Update german translation --- mastodon/src/main/res/values-de-rDE/strings_sk.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mastodon/src/main/res/values-de-rDE/strings_sk.xml b/mastodon/src/main/res/values-de-rDE/strings_sk.xml index 619e6f41c..7233269df 100644 --- a/mastodon/src/main/res/values-de-rDE/strings_sk.xml +++ b/mastodon/src/main/res/values-de-rDE/strings_sk.xml @@ -37,7 +37,7 @@ Listen mit %s Inhaltswarnungen immer ausklappen Laufschrift in Titelleisten deaktivieren - Beitrags-​Benachrichtigungen Trennung deaktivieren + Beitrags Trennung deaktivieren Veröffentlichen Schaltfläche verschieben Zu Moshidon beitragen Föderierte Timeline anzeigen @@ -135,4 +135,4 @@ Kürzlich verwendet Kürzlich verwendete Emojis löschen Deaktiviere die Funktion "Veröffentlichen Schaltfläche verschieben", um eine Anpassung zu ermöglichen. - \ No newline at end of file + From 101e7efd7441cb52fe20fcc36fdfa79acc36871d Mon Sep 17 00:00:00 2001 From: LucasGGamerM Date: Fri, 6 Jan 2023 11:18:51 -0300 Subject: [PATCH 04/11] Fixing #34 --- .../org/joinmastodon/android/GlobalUserPreferences.java | 1 + .../android/ui/displayitems/FooterStatusDisplayItem.java | 6 +++++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/mastodon/src/main/java/org/joinmastodon/android/GlobalUserPreferences.java b/mastodon/src/main/java/org/joinmastodon/android/GlobalUserPreferences.java index c72c63861..15c102dea 100644 --- a/mastodon/src/main/java/org/joinmastodon/android/GlobalUserPreferences.java +++ b/mastodon/src/main/java/org/joinmastodon/android/GlobalUserPreferences.java @@ -69,6 +69,7 @@ public class GlobalUserPreferences{ relocatePublishButton=prefs.getBoolean("relocatePublishButton", true); voteButtonForSingleChoice=prefs.getBoolean("voteButtonForSingleChoice", true); enableDeleteNotifications=prefs.getBoolean("enableDeleteNotifications", true); + reduceMotion=prefs.getBoolean("reduceMotion", false); theme=ThemePreference.values()[prefs.getInt("theme", 0)]; recentLanguages=fromJson(prefs.getString("recentLanguages", "{}"), recentLanguagesType, new HashMap<>()); recentEmojis=fromJson(prefs.getString("recentEmojis", "{}"), recentEmojisType, new HashMap<>()); diff --git a/mastodon/src/main/java/org/joinmastodon/android/ui/displayitems/FooterStatusDisplayItem.java b/mastodon/src/main/java/org/joinmastodon/android/ui/displayitems/FooterStatusDisplayItem.java index a5ad255fc..da595a0d5 100644 --- a/mastodon/src/main/java/org/joinmastodon/android/ui/displayitems/FooterStatusDisplayItem.java +++ b/mastodon/src/main/java/org/joinmastodon/android/ui/displayitems/FooterStatusDisplayItem.java @@ -311,7 +311,11 @@ public class FooterStatusDisplayItem extends StatusDisplayItem{ favorite.setSelected(!item.status.favourited); AccountSessionManager.getInstance().getAccount(item.accountID).getStatusInteractionController().setFavorited(item.status, !item.status.favourited, r->{ if (item.status.favourited) { - v.startAnimation(animSet); + if(GlobalUserPreferences.reduceMotion){ + v.startAnimation(opacityIn); + }else{ + v.startAnimation(animSet); + } } else { v.startAnimation(opacityIn); } From 67338b6c8567c79146128084ac34077eb357b5c0 Mon Sep 17 00:00:00 2001 From: LucasGGamerM Date: Fri, 6 Jan 2023 11:31:25 -0300 Subject: [PATCH 05/11] Allowing multiple notifications by default --- .../java/org/joinmastodon/android/PushNotificationReceiver.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mastodon/src/main/java/org/joinmastodon/android/PushNotificationReceiver.java b/mastodon/src/main/java/org/joinmastodon/android/PushNotificationReceiver.java index 00946de41..d144dcd1c 100644 --- a/mastodon/src/main/java/org/joinmastodon/android/PushNotificationReceiver.java +++ b/mastodon/src/main/java/org/joinmastodon/android/PushNotificationReceiver.java @@ -160,6 +160,6 @@ public class PushNotificationReceiver extends BroadcastReceiver{ if(AccountSessionManager.getInstance().getLoggedInAccounts().size()>1){ builder.setSubText(accountName); } - nm.notify(accountID, NOTIFICATION_ID, builder.build()); + nm.notify(accountID, (int)System.currentTimeMillis(), builder.build()); } } From 23e49c52e54587ffbaf4158db0621f60be29023d Mon Sep 17 00:00:00 2001 From: LucasGGamerM Date: Fri, 6 Jan 2023 12:26:52 -0300 Subject: [PATCH 06/11] Its working, but it still needs a better icon --- .../java/org/joinmastodon/android/GlobalUserPreferences.java | 3 +++ .../org/joinmastodon/android/PushNotificationReceiver.java | 2 +- .../org/joinmastodon/android/fragments/SettingsFragment.java | 4 ++++ mastodon/src/main/res/values/strings_sk.xml | 1 + 4 files changed, 9 insertions(+), 1 deletion(-) diff --git a/mastodon/src/main/java/org/joinmastodon/android/GlobalUserPreferences.java b/mastodon/src/main/java/org/joinmastodon/android/GlobalUserPreferences.java index 15c102dea..da3e4c7c4 100644 --- a/mastodon/src/main/java/org/joinmastodon/android/GlobalUserPreferences.java +++ b/mastodon/src/main/java/org/joinmastodon/android/GlobalUserPreferences.java @@ -32,6 +32,7 @@ public class GlobalUserPreferences{ public static boolean enableDeleteNotifications; public static boolean relocatePublishButton; public static boolean reduceMotion; + public static boolean keepOnlyLatestNotification; public static String publishButtonText; public static ThemePreference theme; public static ColorPreference color; @@ -70,6 +71,7 @@ public class GlobalUserPreferences{ voteButtonForSingleChoice=prefs.getBoolean("voteButtonForSingleChoice", true); enableDeleteNotifications=prefs.getBoolean("enableDeleteNotifications", true); reduceMotion=prefs.getBoolean("reduceMotion", false); + keepOnlyLatestNotification=prefs.getBoolean("keepOnlyLatestNotification", false); theme=ThemePreference.values()[prefs.getInt("theme", 0)]; recentLanguages=fromJson(prefs.getString("recentLanguages", "{}"), recentLanguagesType, new HashMap<>()); recentEmojis=fromJson(prefs.getString("recentEmojis", "{}"), recentEmojisType, new HashMap<>()); @@ -105,6 +107,7 @@ public class GlobalUserPreferences{ .putBoolean("uniformNotificationIcon", uniformNotificationIcon) .putBoolean("enableDeleteNotifications", enableDeleteNotifications) .putBoolean("reduceMotion", reduceMotion) + .putBoolean("keepOnlyLatestNotification", keepOnlyLatestNotification) .putString("publishButtonText", publishButtonText) .putInt("theme", theme.ordinal()) .putString("color", color.name()) diff --git a/mastodon/src/main/java/org/joinmastodon/android/PushNotificationReceiver.java b/mastodon/src/main/java/org/joinmastodon/android/PushNotificationReceiver.java index d144dcd1c..560127c64 100644 --- a/mastodon/src/main/java/org/joinmastodon/android/PushNotificationReceiver.java +++ b/mastodon/src/main/java/org/joinmastodon/android/PushNotificationReceiver.java @@ -160,6 +160,6 @@ public class PushNotificationReceiver extends BroadcastReceiver{ if(AccountSessionManager.getInstance().getLoggedInAccounts().size()>1){ builder.setSubText(accountName); } - nm.notify(accountID, (int)System.currentTimeMillis(), builder.build()); + nm.notify(accountID, GlobalUserPreferences.keepOnlyLatestNotification ? NOTIFICATION_ID : (int)System.currentTimeMillis(), builder.build()); } } diff --git a/mastodon/src/main/java/org/joinmastodon/android/fragments/SettingsFragment.java b/mastodon/src/main/java/org/joinmastodon/android/fragments/SettingsFragment.java index b50936034..0a2dc1515 100644 --- a/mastodon/src/main/java/org/joinmastodon/android/fragments/SettingsFragment.java +++ b/mastodon/src/main/java/org/joinmastodon/android/fragments/SettingsFragment.java @@ -243,6 +243,10 @@ public class SettingsFragment extends MastodonToolbarFragment{ items.add(new SwitchItem(R.string.notify_reblog, R.drawable.ic_fluent_arrow_repeat_all_24_regular, pushSubscription.alerts.reblog, i->onNotificationsChanged(PushNotification.Type.REBLOG, i.checked))); items.add(new SwitchItem(R.string.notify_mention, R.drawable.ic_fluent_mention_24_regular, pushSubscription.alerts.mention, i->onNotificationsChanged(PushNotification.Type.MENTION, i.checked))); items.add(new SwitchItem(R.string.sk_notify_posts, R.drawable.ic_fluent_alert_24_regular, pushSubscription.alerts.status, i->onNotificationsChanged(PushNotification.Type.STATUS, i.checked))); + items.add(new SwitchItem(R.string.sk_keep_only_latest_notification, R.drawable.ic_fluent_alert_24_regular, GlobalUserPreferences.keepOnlyLatestNotification, i->{ + GlobalUserPreferences.keepOnlyLatestNotification=i.checked; + GlobalUserPreferences.save(); + })); items.add(new HeaderItem(R.string.settings_account)); items.add(new TextItem(R.string.sk_settings_profile, ()->UiUtils.launchWebBrowser(getActivity(), "https://"+session.domain+"/settings/profile"), R.drawable.ic_fluent_open_24_regular)); diff --git a/mastodon/src/main/res/values/strings_sk.xml b/mastodon/src/main/res/values/strings_sk.xml index f83d6610d..911280364 100644 --- a/mastodon/src/main/res/values/strings_sk.xml +++ b/mastodon/src/main/res/values/strings_sk.xml @@ -136,4 +136,5 @@ Recently used Clear recently used emoji Disable "Relocate publish button" to allow customization + Keep only latest notification \ No newline at end of file From 13a80fb536a003f58a2ca7b7886072d2c983404b Mon Sep 17 00:00:00 2001 From: Florian Obernberger Date: Fri, 6 Jan 2023 18:12:42 +0100 Subject: [PATCH 07/11] Add new and custom icon --- .../ic_fluent_custom_alert_latest_24_regular.xml | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 mastodon/src/main/res/drawable/ic_fluent_custom_alert_latest_24_regular.xml diff --git a/mastodon/src/main/res/drawable/ic_fluent_custom_alert_latest_24_regular.xml b/mastodon/src/main/res/drawable/ic_fluent_custom_alert_latest_24_regular.xml new file mode 100644 index 000000000..fef28319b --- /dev/null +++ b/mastodon/src/main/res/drawable/ic_fluent_custom_alert_latest_24_regular.xml @@ -0,0 +1,12 @@ + + + + From 3951acf12e94b4bd49ba77d6f07ba862b684f374 Mon Sep 17 00:00:00 2001 From: Florian Obernberger Date: Fri, 6 Jan 2023 18:12:42 +0100 Subject: [PATCH 08/11] Add new and custom icon (cherry picked from commit 13a80fb536a003f58a2ca7b7886072d2c983404b) --- .../ic_fluent_custom_alert_latest_24_regular.xml | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 mastodon/src/main/res/drawable/ic_fluent_custom_alert_latest_24_regular.xml diff --git a/mastodon/src/main/res/drawable/ic_fluent_custom_alert_latest_24_regular.xml b/mastodon/src/main/res/drawable/ic_fluent_custom_alert_latest_24_regular.xml new file mode 100644 index 000000000..fef28319b --- /dev/null +++ b/mastodon/src/main/res/drawable/ic_fluent_custom_alert_latest_24_regular.xml @@ -0,0 +1,12 @@ + + + + From 263bde658e622c91e2b087bc56bd45f42f42394c Mon Sep 17 00:00:00 2001 From: LucasGGamerM Date: Fri, 6 Jan 2023 14:47:06 -0300 Subject: [PATCH 09/11] Fixing #29 for good --- .../org/joinmastodon/android/fragments/SettingsFragment.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mastodon/src/main/java/org/joinmastodon/android/fragments/SettingsFragment.java b/mastodon/src/main/java/org/joinmastodon/android/fragments/SettingsFragment.java index 0a2dc1515..ce7c8ecc4 100644 --- a/mastodon/src/main/java/org/joinmastodon/android/fragments/SettingsFragment.java +++ b/mastodon/src/main/java/org/joinmastodon/android/fragments/SettingsFragment.java @@ -243,7 +243,7 @@ public class SettingsFragment extends MastodonToolbarFragment{ items.add(new SwitchItem(R.string.notify_reblog, R.drawable.ic_fluent_arrow_repeat_all_24_regular, pushSubscription.alerts.reblog, i->onNotificationsChanged(PushNotification.Type.REBLOG, i.checked))); items.add(new SwitchItem(R.string.notify_mention, R.drawable.ic_fluent_mention_24_regular, pushSubscription.alerts.mention, i->onNotificationsChanged(PushNotification.Type.MENTION, i.checked))); items.add(new SwitchItem(R.string.sk_notify_posts, R.drawable.ic_fluent_alert_24_regular, pushSubscription.alerts.status, i->onNotificationsChanged(PushNotification.Type.STATUS, i.checked))); - items.add(new SwitchItem(R.string.sk_keep_only_latest_notification, R.drawable.ic_fluent_alert_24_regular, GlobalUserPreferences.keepOnlyLatestNotification, i->{ + items.add(new SwitchItem(R.string.sk_keep_only_latest_notification, R.drawable.ic_fluent_custom_alert_latest_24_regular, GlobalUserPreferences.keepOnlyLatestNotification, i->{ GlobalUserPreferences.keepOnlyLatestNotification=i.checked; GlobalUserPreferences.save(); })); From 639ddb3f806387469cceaacc5450ee55d1f74b4e Mon Sep 17 00:00:00 2001 From: Tobias S Date: Fri, 6 Jan 2023 19:43:28 +0100 Subject: [PATCH 10/11] Update german translation --- mastodon/src/main/res/values-de-rDE/strings_sk.xml | 1 + 1 file changed, 1 insertion(+) diff --git a/mastodon/src/main/res/values-de-rDE/strings_sk.xml b/mastodon/src/main/res/values-de-rDE/strings_sk.xml index 7233269df..fbdc82e94 100644 --- a/mastodon/src/main/res/values-de-rDE/strings_sk.xml +++ b/mastodon/src/main/res/values-de-rDE/strings_sk.xml @@ -135,4 +135,5 @@ Kürzlich verwendet Kürzlich verwendete Emojis löschen Deaktiviere die Funktion "Veröffentlichen Schaltfläche verschieben", um eine Anpassung zu ermöglichen. + Nur neueste Benachrichtigung behalten From 3a1b71e95cd5bb10f42775a0cac229e7b8a67463 Mon Sep 17 00:00:00 2001 From: LucasGGamerM Date: Sun, 8 Jan 2023 20:55:41 -0300 Subject: [PATCH 11/11] Adding a small little different icon for when the toot has replies. Thanks @sk22 --- .../ic_fluent_chat_multiple_24_regular_text.xml | 15 +++++++++++++++ .../ic_fluent_chat_multiple_24_selector_text.xml | 6 ++++++ .../src/main/res/layout/display_item_footer.xml | 2 +- 3 files changed, 22 insertions(+), 1 deletion(-) create mode 100644 mastodon/src/main/res/drawable/ic_fluent_chat_multiple_24_regular_text.xml create mode 100644 mastodon/src/main/res/drawable/ic_fluent_chat_multiple_24_selector_text.xml diff --git a/mastodon/src/main/res/drawable/ic_fluent_chat_multiple_24_regular_text.xml b/mastodon/src/main/res/drawable/ic_fluent_chat_multiple_24_regular_text.xml new file mode 100644 index 000000000..eb2b42580 --- /dev/null +++ b/mastodon/src/main/res/drawable/ic_fluent_chat_multiple_24_regular_text.xml @@ -0,0 +1,15 @@ + + + + + diff --git a/mastodon/src/main/res/drawable/ic_fluent_chat_multiple_24_selector_text.xml b/mastodon/src/main/res/drawable/ic_fluent_chat_multiple_24_selector_text.xml new file mode 100644 index 000000000..d1ad62c0f --- /dev/null +++ b/mastodon/src/main/res/drawable/ic_fluent_chat_multiple_24_selector_text.xml @@ -0,0 +1,6 @@ + + + + + + diff --git a/mastodon/src/main/res/layout/display_item_footer.xml b/mastodon/src/main/res/layout/display_item_footer.xml index b41397197..d3aa1c3db 100644 --- a/mastodon/src/main/res/layout/display_item_footer.xml +++ b/mastodon/src/main/res/layout/display_item_footer.xml @@ -17,7 +17,7 @@ android:layout_width="wrap_content" android:layout_height="24dp" android:layout_gravity="center" - android:drawableStart="@drawable/ic_fluent_chat_multiple_24_regular" + android:drawableStart="@drawable/ic_fluent_chat_multiple_24_selector_text" android:drawablePadding="8dp" android:drawableTint="?android:textColorSecondary" android:gravity="center_vertical"