Compare commits

...

126 Commits

Author SHA1 Message Date
LucasGGamerM
1a075e32de Fixing it 2023-01-11 20:10:14 -03:00
LucasGGamerM
73869b6ea2 86 changelog 2023-01-11 11:28:29 -03:00
LucasGGamerM
3980329112 Merge remote-tracking branch 'origin/master' 2023-01-11 11:26:21 -03:00
LucasGGamerM
6107b21d3b Merge pull request #43
Update german translation
2023-01-11 11:26:14 -03:00
LucasGGamerM
42a0b881af Bumping version number 2023-01-11 11:23:00 -03:00
LucasGGamerM
2076818220 Now its fixed for good. That was easier than I thought 2023-01-11 11:19:30 -03:00
Tobias S
513bea7959 Merge branch 'LucasGGamerM:master' into master 2023-01-11 05:52:06 +01:00
LucasGGamerM
a48dc18df5 Possibly fixing #29 for good, but the mastodon servers of the accounts I own are slow, so there is basically no way to test it 2023-01-10 21:45:35 -03:00
dontobi
c55639e966 Update german translation 2023-01-10 17:28:26 +01:00
Tobias S
1fc89d7448 Merge branch 'LucasGGamerM:master' into master 2023-01-10 17:20:37 +01:00
LucasGGamerM
4fcc07fcd6 Adding a margin to the char counter when its on the top 2023-01-10 12:24:01 -03:00
LucasGGamerM
b50b1c33da Renaming custom login fragment to custom welcome fragment 2023-01-10 12:11:11 -03:00
LucasGGamerM
25460191b0 Merge pull request #44
feat(compose): move charCounter to action bar if relocatePublishButto…
2023-01-10 12:09:44 -03:00
FineFindus
1206ce6efc feat(compose): move charCounter to action bar if relocatePublishButton is enabled 2023-01-10 15:43:26 +01:00
sk
3cdcffe03d implement announcements
closes #127
2023-01-10 11:16:14 -03:00
sk
b09aab4a1d don't connect to fascists 2023-01-10 11:13:30 -03:00
sk
d27fe4ebd1 tweak header text margin 2023-01-10 11:13:27 -03:00
sk
ab2cee08fe hide keyboard when navigating
closes #227
2023-01-10 11:13:14 -03:00
sk
1fa42fd20f scale text according to system
closes #244
2023-01-10 11:13:04 -03:00
sk
e343131670 fix wrong pin icon
closes #230
2023-01-10 11:11:32 -03:00
sk
f157313d9a click "replying to" to scroll up
closes #241
2023-01-10 11:11:28 -03:00
sk
9bd4433942 tweak reply animation
closes #237
2023-01-10 11:08:56 -03:00
sk
c9cc8e23c1 don't add subject if blank
closes #240
2023-01-10 11:08:53 -03:00
Thiago 'Jedi' Abreu
786dbaf92c Filter all status, even if filters are empty (#255) 2023-01-10 11:08:40 -03:00
mishnz
8dd22e1853 serverKey assignment was missing, corrected. 2023-01-10 11:08:33 -03:00
mishnz
34a4dd6d1f Second fix for MIME64 inconsistency in serverKey.
The previous fix https://github.com/mastodon/mastodon-android/pull/486 would break any connections to any instances using WEB_SAFE MIME64 encoding on the serverKey, which actually appears to be the usual case.
This update reverts to the previous logic, but also converts standard MIME64 characters ('/' and '+') to their WEB_SAFE equivalents.
This ensures the standard case of WEB_SAFE BASE64 serverKeys and the anomolous case of DEFAULT BASE64 keys both work.
2023-01-10 11:08:27 -03:00
mishnz
6e13e592d0 The Mastodon server does not currently use URL_SAFE encoding on its serverKey. Using URL_SAFE in this client means the client will crash for any server that uses a key that generates a Mime64 string containing a "+" or "/". This change removes the URL_SAFE logic. See: https://github.com/mastodon/mastodon-android/issues/483 2023-01-10 11:08:20 -03:00
Tobias S
485ab4ee22 Update german translation 2023-01-10 10:09:11 +01:00
dontobi
59a8d1d462 Update german translation 2023-01-10 06:24:10 +01:00
LucasGGamerM
f4e5baf94d Merge pull request #41
feat(accessibility) add missing toolTipTexts and contentDescriptions
2023-01-09 18:32:21 -03:00
FineFindus
a782160dd3 refactor: use getContentDescription instead of duplicate code 2023-01-09 21:30:52 +01:00
FineFindus
871c17cbe2 merge: update to latest master 2023-01-09 21:18:43 +01:00
FineFindus
047e72ce9c refactor(compose): use UiUtils.getVisibiltyText 2023-01-09 21:05:58 +01:00
FineFindus
6c1424055f feat(StatusDisplay): add toolTip/ContentDescription to visibilty icon 2023-01-09 21:02:00 +01:00
FineFindus
369902ffe5 feat(compose): add toolTip/ContentDescription to error icon 2023-01-09 20:19:29 +01:00
FineFindus
747439999d feat(profile): add toolTip/ContentDescription to fab 2023-01-09 19:23:38 +01:00
FineFindus
4d836f8032 feat(instanceCategory): set (unused) emoji importantForAccessibility to no 2023-01-09 19:21:54 +01:00
FineFindus
f97ab73c5d feat(reportChoice): set radioIcon importantForAccessibility to no 2023-01-09 19:21:20 +01:00
FineFindus
147fb94442 feat(settingsItem): set icon to not importantForAccessibility 2023-01-09 19:20:07 +01:00
FineFindus
975dc94d41 feat(settingsThemeItem): hide image for accessibility 2023-01-09 19:12:19 +01:00
FineFindus
a5c1053c58 feat(recycler_fragment_with_fab): add toolTip/ContentDescription 2023-01-09 17:46:27 +01:00
FineFindus
1bfbb4bf38 fix(composeMedia): change sk_remove_attachment to delete 2023-01-09 17:42:01 +01:00
FineFindus
c2950ace90 feat(tabBar): accessibilty hide profile avatar
Sets the `importantForAccessibility` to no on the profile avatar, since the parent already has a contentDescription.
2023-01-09 17:36:04 +01:00
FineFindus
f0846465c2 feat(accessibility): add contentDesc/toolTip to remove attachment 2023-01-09 17:22:54 +01:00
FineFindus
ddc4512116 feat(accessibility): add contentDesc/toolTip to poll options 2023-01-09 17:22:33 +01:00
FineFindus
1c9e4fe561 feat(accessibility): add contentDesc/toolTip to poll options 2023-01-09 17:21:38 +01:00
FineFindus
35299a7b3f feat(accessibility): add contentDesc and toolTip to audioItem 2023-01-09 17:19:20 +01:00
LucasGGamerM
3a1b71e95c Adding a small little different icon for when the toot has replies. Thanks @sk22 2023-01-08 20:55:41 -03:00
LucasGGamerM
54ec1a6cf7 Merge pull request #38
Update german translation
2023-01-07 20:46:23 -03:00
FineFindus
bed3e987b7 feat(compose/poll): add contentDescription to addPoll 2023-01-07 11:38:00 +01:00
Tobias S
639ddb3f80 Update german translation 2023-01-06 19:43:28 +01:00
LucasGGamerM
e645abb771 Merge pull request #35
Update german translation
2023-01-06 14:51:00 -03:00
LucasGGamerM
762adce054 Merge branch 'bugfix/#29' 2023-01-06 14:47:37 -03:00
LucasGGamerM
263bde658e Fixing #29 for good 2023-01-06 14:47:06 -03:00
Florian Obernberger
3951acf12e Add new and custom icon
(cherry picked from commit 13a80fb536)
2023-01-06 14:43:17 -03:00
LucasGGamerM
5cb640a387 Merge pull request #36
Add new and custom icon
2023-01-06 14:42:46 -03:00
FineFindus
c65b9ff873 fix: remove change 2023-01-06 18:40:28 +01:00
Florian Obernberger
13a80fb536 Add new and custom icon 2023-01-06 18:12:42 +01:00
LucasGGamerM
23e49c52e5 Its working, but it still needs a better icon 2023-01-06 12:26:52 -03:00
Tobias S
9fcc73984b Merge branch 'LucasGGamerM:master' into master 2023-01-06 15:51:29 +01:00
LucasGGamerM
67338b6c85 Allowing multiple notifications by default 2023-01-06 11:31:25 -03:00
LucasGGamerM
101e7efd74 Fixing #34 2023-01-06 11:18:51 -03:00
Tobias S
a996a24b7f Update german translation 2023-01-06 06:22:25 +01:00
Tobias S
44dcc9fe2b Merge branch 'LucasGGamerM:master' into master 2023-01-06 06:20:35 +01:00
LucasGGamerM
58f79e06ef Idk what these are, but testing commits 2023-01-05 21:16:03 -03:00
FineFindus
f197c8201d merge: update to newest master 2023-01-05 19:45:03 +01:00
dontobi
2fc5669203 Update german translation 2023-01-05 18:53:12 +01:00
LucasGGamerM
0065b93060 Adding 85 changelog 2023-01-05 13:44:24 -03:00
LucasGGamerM
3f9dbd6fe2 Bump version number 2023-01-05 13:39:53 -03:00
LucasGGamerM
7ceff3eaa4 Fixing #28 2023-01-05 13:24:09 -03:00
FineFindus
7cdddf06bc feat(compose/add-poll): add contentLabel for more option 2023-01-05 16:24:44 +01:00
LucasGGamerM
77e7b136ff Changing megalodon to moshidon 2023-01-05 12:23:20 -03:00
LucasGGamerM
c8d160fc35 Changing too to post. Fixing #26 2023-01-05 12:19:13 -03:00
LucasGGamerM
ee0737c9c7 Adding the ability to long click or to double click the search icon to bring up the keyboard 2023-01-04 21:54:03 -03:00
LucasGGamerM
0f85be7114 Merge branch 'feature/long_press_discover' 2023-01-04 21:33:19 -03:00
LucasGGamerM
34ba4ceb16 Fixing #31 2023-01-04 21:28:06 -03:00
LucasGGamerM
f2a536d0ea Fixing #31 2023-01-04 18:30:12 -03:00
LucasGGamerM
815c4d4cc9 Merge pull request #32
feat: share links
2023-01-04 18:20:29 -03:00
LucasGGamerM
969b91bba9 Merging stuff and adding more icons 2023-01-04 18:18:58 -03:00
LucasGGamerM
f24abde76e Merge pull request #30
feat(profile/bot-icon): prepend icon to username
2023-01-04 18:04:41 -03:00
LucasGGamerM
f486b1a9ce Merge pull request #24
Feat/favourite animation
2023-01-04 17:59:12 -03:00
LucasGGamerM
3dd6638ef3 Merge pull request #25
German translation - suggested by FineFindus
2023-01-04 17:58:37 -03:00
FineFindus
bcfb63b57c feat(linkSpan/longClick): use share intent istead of copy text 2023-01-04 20:53:30 +01:00
FineFindus
c7f5f6827a refactor(drawables/botIcon): decrease size and change color 2023-01-04 17:25:30 +01:00
FineFindus
8ed88b2b29 refactor(HeaderStatusDisplayItem): add bot icon to username 2023-01-04 17:24:53 +01:00
FineFindus
75db9f4623 refactor(profile/botIcon): move icon to username 2023-01-04 17:24:09 +01:00
LucasGGamerM
b69015a25a Its closer to working 2023-01-03 15:18:34 -03:00
LucasGGamerM
1cdcc8794c Maybe it will work one day? 2023-01-03 11:21:30 -03:00
LucasGGamerM
a0c26b748a It already works, although not to my standard yet 2023-01-03 11:10:53 -03:00
FineFindus
ce5e733c05 fix(drawable/bot): remove unused icons 2023-01-03 14:18:18 +01:00
FineFindus
de485272c5 feat(profile/bot): add bot icon before name 2023-01-03 13:53:04 +01:00
FineFindus
eab53b805e feat(drawable) add filled bot icon 2023-01-03 13:52:09 +01:00
dontobi
a60046f6ef German translation - suggested by FineFindus 2023-01-02 22:15:00 +01:00
FineFindus
b0d223c47c Merge branch 'master' of https://github.com/LucasGGamerM/moshidon into feat/favourite-animation 2023-01-02 21:59:39 +01:00
FineFindus
185a8c776b feat(StatusDisplayItem/favouriteIcon): add spin animation when clicked 2023-01-02 21:57:19 +01:00
LucasGGamerM
f510ee3b4d Merge pull request #23
Update german translation
2023-01-02 17:56:59 -03:00
dontobi
e7a29824e8 Update german translation 2023-01-02 21:54:35 +01:00
LucasGGamerM
69b86dd98c Merge pull request #21
feat(compose/emoji) add a recent category to the emoji keyboard
2023-01-02 17:48:39 -03:00
LucasGGamerM
55807dc7c6 Merge pull request #22
small update of the german translation
2023-01-02 17:45:43 -03:00
dontobi
9a6ee719c4 small update of the german translation 2023-01-02 20:57:23 +01:00
FineFindus
1b02af382c fix(emoji/recent): remove unused imports 2023-01-02 19:43:30 +01:00
FineFindus
4fe87a9888 merge: merge newest upstream/master 2023-01-02 19:42:42 +01:00
LucasGGamerM
91995155e9 Updating 84 changelog 2023-01-02 13:47:42 -03:00
LucasGGamerM
aae0ff5aa7 Fixing the bug with the german translation 2023-01-02 13:42:45 -03:00
LucasGGamerM
821d9b8a5e 84 changelog 2023-01-02 13:41:51 -03:00
LucasGGamerM
2070aed38f Bumping version number 2023-01-02 13:40:03 -03:00
LucasGGamerM
986979eefc Merge remote-tracking branch 'origin/master' 2023-01-02 13:38:59 -03:00
LucasGGamerM
ed3ce54b24 Merge pull request #20
German translation
2023-01-02 13:38:52 -03:00
LucasGGamerM
c80ebf2eda Fixing the login error 2023-01-02 13:38:29 -03:00
FineFindus
42fcd6df51 refactor(emoji/recent): rename NEW_RECENT to NEW_RECENT_VALUE 2023-01-02 16:58:31 +01:00
LucasGGamerM
1f4031da61 Editing the 83 changelog once more 2023-01-02 12:53:39 -03:00
Tobias S
d0ebee74ca Merge branch 'LucasGGamerM:master' into master 2023-01-02 16:52:51 +01:00
Tobias S
e8ec042d96 German translation 2023-01-02 16:52:11 +01:00
LucasGGamerM
bd61bf32b6 Changing the 83 changelog 2023-01-02 12:49:17 -03:00
FineFindus
8b12fac766 feat(emoji/recent): add clear recent emoji setting 2023-01-02 16:47:41 +01:00
LucasGGamerM
ab7e6b3332 Bump version number 2023-01-02 12:45:27 -03:00
LucasGGamerM
548da48615 Adding 83 changelog 2023-01-02 12:44:57 -03:00
FineFindus
0b6128bcdd feat(compose/emojis): add category of recent emojis 2023-01-02 16:44:14 +01:00
LucasGGamerM
198a7d5ad3 Merge pull request #18
feat(compose/publish): Add warning dialog when no image description is provided
2023-01-02 12:33:10 -03:00
LucasGGamerM
040f244e15 Fixing up the bot icon for good 2023-01-02 12:28:07 -03:00
LucasGGamerM
98bc6f14a9 Fixing some icons again 2023-01-02 12:14:27 -03:00
LucasGGamerM
b92e6d2c48 Fixing some icons 2023-01-02 12:12:55 -03:00
LucasGGamerM
ac3875fe08 Fixing #19 2023-01-02 11:46:15 -03:00
FineFindus
6fdbafc67b fix(compose/publish): remove unnecessary import 2023-01-02 12:57:18 +01:00
FineFindus
5aebdcaa6a feat(compose/publish): add warning when no image description provided 2023-01-02 12:53:34 +01:00
LucasGGamerM
2969a3e4fd Including @FineFindus on the changelog 2023-01-01 19:41:42 -03:00
68 changed files with 836 additions and 188 deletions

View File

@@ -9,8 +9,8 @@ android {
applicationId "org.joinmastodon.android.moshinda"
minSdk 23
targetSdk 33
versionCode 82
versionName "1.1.4+fork.82.moshinda"
versionCode 86
versionName "1.1.4+fork.86.moshinda"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
resConfigs "ar-rSA", "be-rBY", "bn-rBD", "bs-rBA", "ca-rES", "cs-rCZ", "de-rDE", "el-rGR", "es-rES", "eu-rES", "fi-rFI", "fil-rPH", "fr-rFR", "ga-rIE", "gd-rGB", "gl-rES", "hi-rIN", "hr-rHR", "hu-rHU", "hy-rAM", "in-rID", "is-rIS", "it-rIT", "iw-rIL", "ja-rJP", "kab", "ko-rKR", "nl-rNL", "oc-rFR", "pl-rPL", "pt-rBR", "pt-rPT", "ro-rRO", "ru-rRU", "si-rLK", "sl-rSI", "sv-rSE", "th-rTH", "tr-rTR", "uk-rUA", "vi-rVN", "zh-rCN", "zh-rTW"
}

View File

@@ -0,0 +1,39 @@
# lists.d Mastodon Blocklist (c) 2022 Greyhat Academy LICENSED UNDER: CC-BY-NC-SA 4.0
# https://raw.githubusercontent.com/greyhat-academy/lists.d/main/mastodon.domains.block.list.tsv
# This list contains domains of toxic mastodon instances
# Last-Modified: 1672044500
# gab - a neonazi social network
gab.ai
gab.com
gab.protohype.net
# consequence-free speech
social.unzensiert.to
freeatlantis.com
# reactionary bigotry and hatespeech against magrinalized groups
poa.st
freespeechextremist.com
rdrama.cc
outpoa.st
anime.website
gameliberty.club
social.byoblu.com
yggdrasil.social
smuglo.li
dogeposting.social
unsafe.space
freezepeach.xyz
# + CSAM
rojogato.com
# antivaxxer shitposting & fearmongering
shadowsocial.org
# Kiwifarms
kiwifarms.net
kiwifarms.cc
kiwifarms.is
kiwifarms.pleroma.net
1 # lists.d Mastodon Blocklist (c) 2022 Greyhat Academy LICENSED UNDER: CC-BY-NC-SA 4.0
2 # https://raw.githubusercontent.com/greyhat-academy/lists.d/main/mastodon.domains.block.list.tsv
3 # This list contains domains of toxic mastodon instances
4 # Last-Modified: 1672044500
5 # gab - a neonazi social network
6 gab.ai
7 gab.com
8 gab.protohype.net
9 # consequence-free speech
10 social.unzensiert.to
11 freeatlantis.com
12 # reactionary bigotry and hatespeech against magrinalized groups
13 poa.st
14 freespeechextremist.com
15 rdrama.cc
16 outpoa.st
17 anime.website
18 gameliberty.club
19 social.byoblu.com
20 yggdrasil.social
21 smuglo.li
22 dogeposting.social
23 unsafe.space
24 freezepeach.xyz
25 # + CSAM
26 rojogato.com
27 # antivaxxer shitposting & fearmongering
28 shadowsocial.org
29 # Kiwifarms
30 kiwifarms.net
31 kiwifarms.cc
32 kiwifarms.is
33 kiwifarms.pleroma.net

View File

@@ -53,7 +53,10 @@ public class ExternalShareActivity extends FragmentStackActivity{
Intent intent=getIntent();
StringBuilder builder=new StringBuilder();
String subject = "";
if (intent.hasExtra(Intent.EXTRA_SUBJECT)) builder.append(subject = intent.getStringExtra(Intent.EXTRA_SUBJECT)).append("\n\n");
if (intent.hasExtra(Intent.EXTRA_SUBJECT)) {
subject = intent.getStringExtra(Intent.EXTRA_SUBJECT);
if (!subject.isBlank()) builder.append(subject).append("\n\n");
}
if (intent.hasExtra(Intent.EXTRA_TEXT)) builder.append(intent.getStringExtra(Intent.EXTRA_TEXT)).append("\n");
String text=builder.toString();
List<Uri> mediaUris;

View File

@@ -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;
@@ -39,6 +40,9 @@ public class GlobalUserPreferences{
private final static Type recentLanguagesType = new TypeToken<Map<String, List<String>>>() {}.getType();
public static Map<String, List<String>> recentLanguages;
private final static Type recentEmojisType = new TypeToken<Map<String, Integer>>() {}.getType();
public static Map<String, Integer> recentEmojis;
private static SharedPreferences getPrefs(){
return MastodonApp.context.getSharedPreferences("global", Context.MODE_PRIVATE);
}
@@ -66,8 +70,11 @@ public class GlobalUserPreferences{
relocatePublishButton=prefs.getBoolean("relocatePublishButton", true);
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<>());
publishButtonText=prefs.getString("publishButtonText", "");
try {
@@ -100,10 +107,12 @@ 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())
.putString("recentLanguages", gson.toJson(recentLanguages))
.putString("recentEmojis", gson.toJson(recentEmojis))
.apply();
}

View File

@@ -16,7 +16,8 @@ import org.joinmastodon.android.fragments.HomeFragment;
import org.joinmastodon.android.fragments.ProfileFragment;
import org.joinmastodon.android.fragments.ThreadFragment;
import org.joinmastodon.android.fragments.onboarding.AccountActivationFragment;
import org.joinmastodon.android.fragments.onboarding.CustomLoginFragment;
import org.joinmastodon.android.fragments.onboarding.CustomWelcomeFragment;
import org.joinmastodon.android.fragments.onboarding.CustomWelcomeFragment;
import org.joinmastodon.android.model.Notification;
import org.joinmastodon.android.ui.utils.UiUtils;
import org.joinmastodon.android.updater.GithubSelfUpdater;
@@ -33,7 +34,7 @@ public class MainActivity extends FragmentStackActivity{
if(savedInstanceState==null){
if(AccountSessionManager.getInstance().getLoggedInAccounts().isEmpty()){
showFragmentClearingBackStack(new CustomLoginFragment());
showFragmentClearingBackStack(new CustomWelcomeFragment());
}else{
AccountSessionManager.getInstance().maybeUpdateLocalInfo();
AccountSession session;

View File

@@ -38,6 +38,8 @@ public class PushNotificationReceiver extends BroadcastReceiver{
public static final int NOTIFICATION_ID=178;
private static int notificationID;
@Override
public void onReceive(Context context, Intent intent){
if(BuildConfig.DEBUG){
@@ -125,17 +127,21 @@ public class PushNotificationReceiver extends BroadcastReceiver{
.setDefaults(Notification.DEFAULT_SOUND | Notification.DEFAULT_VIBRATE);
}
Drawable avatar=ImageCache.getInstance(context).get(new UrlImageLoaderRequest(pn.icon, V.dp(50), V.dp(50)));
notificationID = GlobalUserPreferences.keepOnlyLatestNotification ? NOTIFICATION_ID : (int)System.currentTimeMillis();
Intent contentIntent=new Intent(context, MainActivity.class);
contentIntent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
contentIntent.putExtra("fromNotification", true);
contentIntent.putExtra("accountID", accountID);
contentIntent.putExtra("notificationID", notificationID);
if(notification!=null){
contentIntent.putExtra("notification", Parcels.wrap(notification));
}
builder.setContentTitle(pn.title)
.setContentText(pn.body)
.setStyle(new Notification.BigTextStyle().bigText(pn.body))
.setContentIntent(PendingIntent.getActivity(context, accountID.hashCode() & 0xFFFF, contentIntent, PendingIntent.FLAG_IMMUTABLE | PendingIntent.FLAG_UPDATE_CURRENT))
.setContentIntent(PendingIntent.getActivity(context, notificationID, contentIntent, PendingIntent.FLAG_IMMUTABLE | PendingIntent.FLAG_UPDATE_CURRENT))
.setWhen(notification==null ? System.currentTimeMillis() : notification.createdAt.toEpochMilli())
.setShowWhen(true)
.setCategory(Notification.CATEGORY_SOCIAL)
@@ -160,6 +166,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, notificationID, builder.build());
}
}

View File

@@ -12,11 +12,14 @@ import com.google.gson.JsonParser;
import com.google.gson.JsonSyntaxException;
import org.joinmastodon.android.BuildConfig;
import org.joinmastodon.android.MastodonApp;
import org.joinmastodon.android.api.gson.IsoInstantTypeAdapter;
import org.joinmastodon.android.api.gson.IsoLocalDateTypeAdapter;
import org.joinmastodon.android.api.session.AccountSession;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.Reader;
import java.time.Instant;
import java.time.LocalDate;
@@ -47,9 +50,22 @@ public class MastodonAPIController{
private static OkHttpClient httpClient=new OkHttpClient.Builder().build();
private AccountSession session;
private static List<String> badDomains = new ArrayList<>();
static{
thread.start();
try {
final BufferedReader reader = new BufferedReader(new InputStreamReader(
MastodonApp.context.getAssets().open("blocks.tsv")
));
String line;
while ((line = reader.readLine()) != null) {
if (line.isBlank() || line.startsWith("#")) continue;
badDomains.add(line.toLowerCase().trim());
}
} catch (IOException e) {
e.printStackTrace();
}
}
public MastodonAPIController(@Nullable AccountSession session){
@@ -57,8 +73,11 @@ public class MastodonAPIController{
}
public <T> void submitRequest(final MastodonAPIRequest<T> req){
final String host = req.getURL().getHost().toLowerCase();
final boolean isBad = badDomains.stream().anyMatch(host::endsWith);
thread.postRunnable(()->{
try{
if (isBad) throw new IllegalArgumentException();
if(req.canceled)
return;
Request.Builder builder=new Request.Builder()

View File

@@ -162,6 +162,8 @@ public class PushSubscriptionManager{
@Override
public void onSuccess(PushSubscription result){
MastodonAPIController.runInBackground(()->{
result.serverKey=result.serverKey.replace('/','_');
result.serverKey=result.serverKey.replace('+','-');
serverKey=deserializeRawPublicKey(Base64.decode(result.serverKey, Base64.URL_SAFE));
AccountSession session=AccountSessionManager.getInstance().tryGetAccount(accountID);

View File

@@ -0,0 +1,10 @@
package org.joinmastodon.android.api.requests.announcements;
import org.joinmastodon.android.api.MastodonAPIRequest;
public class DismissAnnouncement extends MastodonAPIRequest<Object>{
public DismissAnnouncement(String id){
super(HttpMethod.POST, "/announcements/" + id + "/dismiss", Object.class);
setRequestBody(new Object());
}
}

View File

@@ -0,0 +1,15 @@
package org.joinmastodon.android.api.requests.announcements;
import com.google.gson.reflect.TypeToken;
import org.joinmastodon.android.api.MastodonAPIRequest;
import org.joinmastodon.android.model.Announcement;
import java.util.List;
public class GetAnnouncements extends MastodonAPIRequest<List<Announcement>> {
public GetAnnouncements(boolean withDismissed) {
super(MastodonAPIRequest.HttpMethod.GET, "/announcements", new TypeToken<>(){});
addQueryParameter("with_dismissed", withDismissed ? "true" : "false");
}
}

View File

@@ -0,0 +1,107 @@
package org.joinmastodon.android.fragments;
import android.app.Activity;
import android.os.Bundle;
import android.text.TextUtils;
import android.view.View;
import android.widget.ImageButton;
import com.squareup.otto.Subscribe;
import org.joinmastodon.android.E;
import org.joinmastodon.android.R;
import org.joinmastodon.android.api.requests.announcements.GetAnnouncements;
import org.joinmastodon.android.api.requests.statuses.CreateStatus;
import org.joinmastodon.android.api.requests.statuses.GetScheduledStatuses;
import org.joinmastodon.android.api.session.AccountSession;
import org.joinmastodon.android.api.session.AccountSessionManager;
import org.joinmastodon.android.events.ScheduledStatusCreatedEvent;
import org.joinmastodon.android.events.ScheduledStatusDeletedEvent;
import org.joinmastodon.android.model.Account;
import org.joinmastodon.android.model.Announcement;
import org.joinmastodon.android.model.HeaderPaginationList;
import org.joinmastodon.android.model.Instance;
import org.joinmastodon.android.model.ScheduledStatus;
import org.joinmastodon.android.model.Status;
import org.joinmastodon.android.ui.displayitems.HeaderStatusDisplayItem;
import org.joinmastodon.android.ui.displayitems.StatusDisplayItem;
import org.joinmastodon.android.ui.displayitems.TextStatusDisplayItem;
import org.joinmastodon.android.ui.text.HtmlParser;
import org.joinmastodon.android.ui.utils.UiUtils;
import org.parceler.Parcels;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import java.util.stream.Collectors;
import me.grishka.appkit.Nav;
import me.grishka.appkit.api.PaginatedList;
import me.grishka.appkit.api.SimpleCallback;
public class AnnouncementsFragment extends BaseStatusListFragment<Announcement> {
private Instance instance;
private AccountSession session;
private List<String> unreadIDs = null;
@Override
public void onAttach(Activity activity){
super.onAttach(activity);
setTitle(R.string.sk_announcements);
session = AccountSessionManager.getInstance().getAccount(accountID);
instance = AccountSessionManager.getInstance().getInstanceInfo(session.domain);
loadData();
}
@Override
protected List<StatusDisplayItem> buildDisplayItems(Announcement a) {
if(TextUtils.isEmpty(a.content)) return List.of();
Account instanceUser = new Account();
instanceUser.id = instanceUser.acct = instanceUser.username = session.domain;
instanceUser.displayName = instance.title;
instanceUser.url = "https://"+session.domain+"/about";
instanceUser.avatar = instanceUser.avatarStatic = instance.thumbnail;
instanceUser.emojis = List.of();
Status fakeStatus = a.toStatus();
return List.of(
HeaderStatusDisplayItem.fromAnnouncement(a, fakeStatus, instanceUser, this, accountID, this::onMarkAsRead),
new TextStatusDisplayItem(a.id, HtmlParser.parse(a.content, a.emojis, a.mentions, a.tags, accountID), this, fakeStatus)
);
}
public void onMarkAsRead(String id) {
if (unreadIDs == null) return;
unreadIDs.remove(id);
if (unreadIDs.size() == 0) setResult(true, null);
}
@Override
public void onDestroy() {
super.onDestroy();
}
@Override
protected void addAccountToKnown(Announcement s) {}
@Override
public void onItemClick(String id) {
}
@Override
protected void onDataLoaded(List<Announcement> d, boolean more) {
unreadIDs = d.stream().filter(a -> !a.read).map(a -> a.id).collect(Collectors.toList());
super.onDataLoaded(d, more);
}
@Override
protected void doLoadData(int offset, int count){
currentRequest=new GetAnnouncements(true)
.setCallback(new SimpleCallback<>(this){
@Override
public void onSuccess(List<Announcement> result){
onDataLoaded(result, false);
}
})
.exec(accountID);
}
}

View File

@@ -307,12 +307,14 @@ public class ComposeFragment extends MastodonToolbarFragment implements OnBackPr
draftsBtn=view.findViewById(R.id.drafts_btn);
draftsBtn.setVisibility(View.VISIBLE);
} else {
charCounter=view.findViewById(R.id.char_counter);
charCounter.setVisibility(View.VISIBLE);
charCounter.setText(String.valueOf(charLimit));
}
mainEditText=view.findViewById(R.id.toot_text);
mainEditTextWrap=view.findViewById(R.id.toot_text_wrap);
charCounter=view.findViewById(R.id.char_counter);
charCounter.setText(String.valueOf(charLimit));
scrollView=view.findViewById(R.id.scroll_view);
selfName=view.findViewById(R.id.self_name);
@@ -588,10 +590,10 @@ public class ComposeFragment extends MastodonToolbarFragment implements OnBackPr
scrollView.post(() -> {
int bottom = scrollView.getChildAt(0).getBottom();
int delta = bottom - (scrollView.getScrollY() + scrollView.getHeight());
int space = GlobalUserPreferences.reduceMotion ? 0 : Math.min(V.dp(120), delta);
int space = GlobalUserPreferences.reduceMotion ? 0 : Math.min(V.dp(70), delta);
scrollView.scrollBy(0, delta - space);
if (!GlobalUserPreferences.reduceMotion) {
scrollView.postDelayed(() -> scrollView.smoothScrollBy(0, space), 100);
scrollView.postDelayed(() -> scrollView.smoothScrollBy(0, space), 130);
}
});
}
@@ -621,6 +623,7 @@ public class ComposeFragment extends MastodonToolbarFragment implements OnBackPr
Bundle args=new Bundle();
args.putString("account", accountID);
args.putParcelable("profileAccount", Parcels.wrap(replyTo.account));
imm.hideSoftInputFromWindow(view.getWindowToken(), 0);
Nav.go(getActivity(), ProfileFragment.class, args);
});
@@ -650,13 +653,10 @@ public class ComposeFragment extends MastodonToolbarFragment implements OnBackPr
else view.findViewById(R.id.display_item_text).setLayoutParams(new LinearLayout.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, V.dp(16)));
replyText.setText(getString(R.string.in_reply_to, replyTo.account.displayName));
int visibilityNameRes = switch (replyTo.visibility) {
case PUBLIC -> R.string.visibility_public;
case UNLISTED -> R.string.sk_visibility_unlisted;
case PRIVATE -> R.string.visibility_followers_only;
case DIRECT -> R.string.visibility_private;
};
replyText.setContentDescription(getString(R.string.in_reply_to, replyTo.account.displayName) + ". " + getString(R.string.post_visibility) + ": " + getString(visibilityNameRes));
replyText.setContentDescription(getString(R.string.in_reply_to, replyTo.account.displayName) + ". " + getString(R.string.post_visibility) + ": " + UiUtils.getVisibilityText(replyTo));
replyText.setOnClickListener(v->{
scrollView.smoothScrollTo(0, 0);
});
ArrayList<String> mentions=new ArrayList<>();
String ownID=AccountSessionManager.getInstance().getAccount(accountID).self.id;
@@ -754,6 +754,10 @@ public class ComposeFragment extends MastodonToolbarFragment implements OnBackPr
draftsBtn = wrap.findViewById(R.id.drafts_btn);
draftsBtn.setVisibility(View.VISIBLE);
}else{
charCounter = wrap.findViewById(R.id.char_counter);
charCounter.setVisibility(View.VISIBLE);
charCounter.setText(String.valueOf(charLimit));
}
// draftsBtn = wrap.findViewById(R.id.drafts_btn);
@@ -917,7 +921,18 @@ public class ComposeFragment extends MastodonToolbarFragment implements OnBackPr
}
private void onPublishClick(View v){
publish();
if (!attachments.isEmpty()
&& statusVisibility != StatusPrivacy.DIRECT
&& !attachments.stream().allMatch(attachment -> attachment.description != null && !attachment.description.isBlank())) {
new M3AlertDialogBuilder(getActivity())
.setTitle(R.string.sk_no_image_desc_title)
.setMessage(R.string.sk_no_image_desc)
.setNegativeButton(R.string.cancel, null)
.setPositiveButton(R.string.publish, (dialog, i)-> publish())
.show();
} else {
publish();
}
}
private void publishErrorCallback(ErrorResponse error) {
@@ -1030,6 +1045,7 @@ public class ComposeFragment extends MastodonToolbarFragment implements OnBackPr
}
};
if(editingStatus!=null && !redraftStatus){
new EditStatus(req, editingStatus.id)
.setCallback(resCallback)

View File

@@ -202,6 +202,17 @@ public class HomeFragment extends AppKitFragment implements OnBackPressedListene
private void onTabSelected(@IdRes int tab){
Fragment newFragment=fragmentForTab(tab);
if(tab==currentTab){
if(tab == R.id.tab_search){
if(newFragment instanceof ScrollableToTop scrollable)
scrollable.scrollToTop();
searchFragment.selectSearch();
return;
}
if(newFragment instanceof ScrollableToTop scrollable)
scrollable.scrollToTop();
return;
}
if(tab==currentTab && tab == R.id.tab_search){
if(newFragment instanceof ScrollableToTop scrollable)
scrollable.scrollToTop();
return;
@@ -235,6 +246,12 @@ public class HomeFragment extends AppKitFragment implements OnBackPressedListene
new AccountSwitcherSheet(getActivity()).show();
return true;
}
if(tab==R.id.tab_search){
onTabSelected(R.id.tab_search);
tabBar.selectTab(R.id.tab_search);
searchFragment.selectSearch();
return true;
}
return false;
}

View File

@@ -29,10 +29,12 @@ import com.squareup.otto.Subscribe;
import org.joinmastodon.android.E;
import org.joinmastodon.android.GlobalUserPreferences;
import org.joinmastodon.android.R;
import org.joinmastodon.android.api.requests.announcements.GetAnnouncements;
import org.joinmastodon.android.api.requests.timelines.GetHomeTimeline;
import org.joinmastodon.android.api.session.AccountSessionManager;
import org.joinmastodon.android.events.SelfUpdateStateChangedEvent;
import org.joinmastodon.android.events.StatusCreatedEvent;
import org.joinmastodon.android.model.Announcement;
import org.joinmastodon.android.model.CacheablePaginatedResponse;
import org.joinmastodon.android.model.Filter;
import org.joinmastodon.android.model.Status;
@@ -56,11 +58,14 @@ import me.grishka.appkit.utils.CubicBezierInterpolator;
import me.grishka.appkit.utils.V;
public class HomeTimelineFragment extends StatusListFragment{
private static final int ANNOUNCEMENTS_RESULT = 654;
private ImageButton fab;
private ImageView toolbarLogo;
private Button toolbarShowNewPostsBtn;
private boolean newPostsBtnShown;
private AnimatorSet currentNewPostsAnim;
private MenuItem announcements;
private String maxID;
@@ -126,16 +131,40 @@ public class HomeTimelineFragment extends StatusListFragment{
@Override
public void onCreateOptionsMenu(Menu menu, MenuInflater inflater){
inflater.inflate(R.menu.home, menu);
announcements = menu.findItem(R.id.announcements);
new GetAnnouncements(false).setCallback(new Callback<>() {
@Override
public void onSuccess(List<Announcement> result) {
boolean hasUnread = result.stream().anyMatch(a -> !a.read);
announcements.setIcon(hasUnread ? R.drawable.ic_announcements_24_badged : R.drawable.ic_fluent_megaphone_24_regular);
}
@Override
public void onError(ErrorResponse error) {
error.showToast(getActivity());
}
}).exec(accountID);
}
@Override
public boolean onOptionsItemSelected(MenuItem item){
Bundle args=new Bundle();
args.putString("account", accountID);
Nav.go(getActivity(), SettingsFragment.class, args);
if (item.getItemId() == R.id.settings) Nav.go(getActivity(), SettingsFragment.class, args);
if (item.getItemId() == R.id.announcements) {
Nav.goForResult(getActivity(), AnnouncementsFragment.class, args, ANNOUNCEMENTS_RESULT, this);
}
return true;
}
@Override
public void onFragmentResult(int reqCode, boolean noMoreUnread, Bundle result){
if (reqCode == ANNOUNCEMENTS_RESULT && noMoreUnread) {
announcements.setIcon(R.drawable.ic_fluent_megaphone_24_regular);
}
}
@Override
public void onConfigurationChanged(Configuration newConfig){
super.onConfigurationChanged(newConfig);
@@ -188,10 +217,8 @@ public class HomeTimelineFragment extends StatusListFragment{
result.get(result.size()-1).hasGapAfter=true;
toAdd=result;
}
List<Filter> filters=AccountSessionManager.getInstance().getAccount(accountID).wordFilters.stream().filter(f->f.context.contains(Filter.FilterContext.HOME)).collect(Collectors.toList());
if(!filters.isEmpty()){
toAdd=toAdd.stream().filter(new StatusFilterPredicate(filters)).collect(Collectors.toList());
}
StatusFilterPredicate filterPredicate=new StatusFilterPredicate(accountID, Filter.FilterContext.HOME);
toAdd=toAdd.stream().filter(filterPredicate).collect(Collectors.toList());
if(!toAdd.isEmpty()){
prependItems(toAdd, true);
showNewPostsButton();

View File

@@ -17,7 +17,6 @@ import android.os.Bundle;
import android.text.SpannableStringBuilder;
import android.text.TextUtils;
import android.text.style.ImageSpan;
import android.util.Log;
import android.view.Gravity;
import android.view.LayoutInflater;
import android.view.Menu;
@@ -35,9 +34,13 @@ import android.widget.ImageView;
import android.widget.ProgressBar;
import android.widget.RelativeLayout;
import android.widget.TextView;
import android.widget.Toast;
import android.widget.Toolbar;
import androidx.annotation.NonNull;
import androidx.recyclerview.widget.RecyclerView;
import androidx.swiperefreshlayout.widget.SwipeRefreshLayout;
import androidx.viewpager2.widget.ViewPager2;
import org.joinmastodon.android.GlobalUserPreferences;
import org.joinmastodon.android.R;
import org.joinmastodon.android.api.requests.accounts.GetAccountByID;
@@ -76,10 +79,6 @@ import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import androidx.annotation.NonNull;
import androidx.recyclerview.widget.RecyclerView;
import androidx.swiperefreshlayout.widget.SwipeRefreshLayout;
import androidx.viewpager2.widget.ViewPager2;
import me.grishka.appkit.Nav;
import me.grishka.appkit.api.Callback;
import me.grishka.appkit.api.ErrorResponse;
@@ -97,7 +96,6 @@ public class ProfileFragment extends LoaderFragment implements OnBackPressedList
private static final int COVER_RESULT=343;
private ImageView avatar;
private Button botIcon;
private CoverImageView cover;
private View avatarBorder;
private TextView name, username, bio, followersCount, followersLabel, followingCount, followingLabel, postsCount, postsLabel;
@@ -132,7 +130,6 @@ public class ProfileFragment extends LoaderFragment implements OnBackPressedList
private WindowInsets childInsets;
private PhotoViewer currentPhotoViewer;
private boolean editModeLoading;
private String prefilledText;
public ProfileFragment(){
super(R.layout.loader_fragment_overlay_toolbar);
@@ -157,8 +154,11 @@ public class ProfileFragment extends LoaderFragment implements OnBackPressedList
if(!getArguments().getBoolean("noAutoLoad", false))
loadData();
}
}
prefilledText = AccountSessionManager.getInstance().isSelf(accountID, account) ? null : '@'+account.acct+' ';
private String getPrefilledText() {
return account == null || AccountSessionManager.getInstance().isSelf(accountID, account)
? null : '@'+account.acct+' ';
}
@Override
@@ -174,11 +174,6 @@ public class ProfileFragment extends LoaderFragment implements OnBackPressedList
avatar=content.findViewById(R.id.avatar);
cover=content.findViewById(R.id.cover);
avatarBorder=content.findViewById(R.id.avatar_border);
botIcon=content.findViewById(R.id.bot_icon);
botIcon.setOnClickListener(v ->{
Toast.makeText(getActivity(), R.string.sk_bot_account,
Toast.LENGTH_LONG).show();
});
name=content.findViewById(R.id.name);
username=content.findViewById(R.id.username);
bio=content.findViewById(R.id.bio);
@@ -188,6 +183,7 @@ public class ProfileFragment extends LoaderFragment implements OnBackPressedList
followingCount=content.findViewById(R.id.following_count);
followingLabel=content.findViewById(R.id.following_label);
followingBtn=content.findViewById(R.id.following_btn);
postsCount=content.findViewById(R.id.posts_count);
postsLabel=content.findViewById(R.id.posts_label);
postsBtn=content.findViewById(R.id.posts_btn);
@@ -271,15 +267,13 @@ public class ProfileFragment extends LoaderFragment implements OnBackPressedList
}
});
botIcon.setVisibility(account.bot ? View.VISIBLE : View.GONE);
actionButton.setOnClickListener(this::onActionButtonClick);
notifyButton.setOnClickListener(this::onNotifyButtonClick);
avatar.setOnClickListener(this::onAvatarClick);
cover.setOnClickListener(this::onCoverClick);
refreshLayout.setOnRefreshListener(this);
fab.setOnClickListener(this::onFabClick);
fab.setOnLongClickListener(v->UiUtils.pickAccountForCompose(getActivity(), accountID, prefilledText));
fab.setOnLongClickListener(v->UiUtils.pickAccountForCompose(getActivity(), accountID, getPrefilledText()));
if(loaded){
bindHeaderView();
@@ -292,6 +286,10 @@ public class ProfileFragment extends LoaderFragment implements OnBackPressedList
followersBtn.setOnClickListener(this::onFollowersOrFollowingClick);
followingBtn.setOnClickListener(this::onFollowersOrFollowingClick);
if (account != null && account.bot) {
username.setCompoundDrawablesWithIntrinsicBounds(R.drawable.ic_fluent_bot_24_filled, 0, 0, 0);
}
username.setOnLongClickListener(v->{
String usernameString=account.acct;
if(!usernameString.contains("@")){
@@ -554,25 +552,29 @@ public class ProfileFragment extends LoaderFragment implements OnBackPressedList
if(relationship==null && !isOwnProfile)
return;
inflater.inflate(isOwnProfile ? R.menu.profile_own : R.menu.profile, menu);
// UiUtils.enableOptionsMenuIcons(getActivity(), menu, R.id.bookmarks, R.id.followed_hashtags);
menu.findItem(R.id.share).setTitle(getString(R.string.share_user, account.getDisplayUsername()));
if(isOwnProfile){
UiUtils.enableOptionsMenuIcons(getActivity(), menu, R.id.bookmarks, R.id.followed_hashtags, R.id.favorites, R.id.scheduled, R.id.share);
}else{
UiUtils.enableOptionsMenuIcons(getActivity(), menu, R.id.bookmarks, R.id.followed_hashtags, R.id.favorites, R.id.scheduled);
}
menu.findItem(R.id.share).setTitle(getString(R.string.share_user, account.getShortUsername()));
if(isOwnProfile)
return;
MenuItem mute = menu.findItem(R.id.mute);
mute.setTitle(getString(relationship.muting ? R.string.unmute_user : R.string.mute_user, account.getDisplayUsername()));
mute.setIcon(relationship.muting ? R.drawable.ic_fluent_speaker_2_24_regular : R.drawable.ic_fluent_speaker_mute_24_regular);
mute.setTitle(getString(relationship.muting ? R.string.unmute_user : R.string.mute_user, account.getShortUsername()));
mute.setIcon(relationship.muting ? R.drawable.ic_fluent_speaker_0_24_regular : R.drawable.ic_fluent_speaker_off_24_regular);
UiUtils.insetPopupMenuIcon(getContext(), mute);
menu.findItem(R.id.block).setTitle(getString(relationship.blocking ? R.string.unblock_user : R.string.block_user, account.getDisplayUsername()));
menu.findItem(R.id.report).setTitle(getString(R.string.report_user, account.getDisplayUsername()));
menu.findItem(R.id.block).setTitle(getString(relationship.blocking ? R.string.unblock_user : R.string.block_user, account.getShortUsername()));
menu.findItem(R.id.report).setTitle(getString(R.string.report_user, account.getShortUsername()));
MenuItem manageUserLists=menu.findItem(R.id.manage_user_lists);
if(relationship.following) {
MenuItem hideBoosts = menu.findItem(R.id.hide_boosts);
hideBoosts.setTitle(getString(relationship.showingReblogs ? R.string.hide_boosts_from_user : R.string.show_boosts_from_user, account.getDisplayUsername()));
hideBoosts.setTitle(getString(relationship.showingReblogs ? R.string.hide_boosts_from_user : R.string.show_boosts_from_user, account.getShortUsername()));
hideBoosts.setIcon(relationship.showingReblogs ? R.drawable.ic_fluent_arrow_repeat_all_off_24_regular : R.drawable.ic_fluent_arrow_repeat_all_24_regular);
UiUtils.insetPopupMenuIcon(getContext(), hideBoosts);
manageUserLists.setTitle(getString(R.string.sk_lists_with_user, account.getDisplayUsername()));
manageUserLists.setTitle(getString(R.string.sk_lists_with_user, account.getShortUsername()));
manageUserLists.setVisible(true);
}else {
menu.findItem(R.id.hide_boosts).setVisible(false);
@@ -956,7 +958,7 @@ public class ProfileFragment extends LoaderFragment implements OnBackPressedList
private void onFabClick(View v){
Bundle args=new Bundle();
args.putString("account", accountID);
if(prefilledText != null) args.putString("prefilledText", prefilledText);
if(getPrefilledText() != null) args.putString("prefilledText", getPrefilledText());
Nav.go(getActivity(), ComposeFragment.class, args);
}

View File

@@ -131,10 +131,15 @@ public class SettingsFragment extends MastodonToolbarFragment{
case NORD -> R.string.sk_color_palette_nord;
});
}));
items.add(new ButtonItem(R.string.sk_settings_publish_button_text, R.drawable.ic_fluent_send_24_regular, b->{
items.add(new ButtonItem(R.string.sk_settings_publish_button_text, R.drawable.ic_fluent_send_24_regular, b-> {
updatePublishText(b);
b.setOnClickListener(l->{
if (GlobalUserPreferences.relocatePublishButton) {
b.setOnClickListener(l -> {
Toast.makeText(getActivity(), R.string.sk_disable_relocate_publish_button_to_enable_customization,
Toast.LENGTH_LONG).show();
});
} else {
b.setOnClickListener(l -> {
FrameLayout inputWrap = new FrameLayout(getContext());
EditText input = new EditText(getContext());
input.setHint(R.string.publish);
@@ -154,9 +159,10 @@ public class SettingsFragment extends MastodonToolbarFragment{
GlobalUserPreferences.save();
updatePublishText(b);
})
.setNegativeButton(R.string.cancel, (d, which) -> {})
.setNegativeButton(R.string.cancel, (d, which) -> {
})
.show();
});
});}
}));
items.add(new SwitchItem(R.string.sk_settings_uniform_icon_for_notifications, R.drawable.ic_ntf_logo, GlobalUserPreferences.uniformNotificationIcon, i->{
GlobalUserPreferences.uniformNotificationIcon=i.checked;
@@ -237,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_custom_alert_latest_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));
@@ -273,6 +283,10 @@ public class SettingsFragment extends MastodonToolbarFragment{
GlobalUserPreferences.recentLanguages.remove(accountID);
GlobalUserPreferences.save();
})));
items.add(new TextItem(R.string.sk_clear_recent_emoji, ()-> {
GlobalUserPreferences.recentEmojis.clear();
GlobalUserPreferences.save();
}));
// items.add(new TextItem(R.string.log_out, this::confirmLogOut));
items.add(new FooterItem(getString(R.string.sk_settings_app_version, BuildConfig.VERSION_NAME, BuildConfig.VERSION_CODE)));

View File

@@ -358,4 +358,10 @@ public class DiscoverFragment extends AppKitFragment implements ScrollableToTop,
return position;
}
}
public void selectSearch(){
searchEdit.requestFocus();
onSearchEditFocusChanged(searchEdit, true);
getActivity().getSystemService(InputMethodManager.class).showSoftInput(searchEdit, 0);
}
}

View File

@@ -36,10 +36,10 @@ import me.grishka.appkit.utils.SingleViewRecyclerAdapter;
import me.grishka.appkit.utils.V;
import me.grishka.appkit.views.UsableRecyclerView;
public class CustomLoginFragment extends InstanceCatalogFragment {
public class CustomWelcomeFragment extends InstanceCatalogFragment {
private View headerView;
public CustomLoginFragment() {
public CustomWelcomeFragment() {
super(R.layout.fragment_welcome_custom, 1);
}
@@ -55,9 +55,9 @@ public class CustomLoginFragment extends InstanceCatalogFragment {
dataLoaded();
}
// @Override
@Override
protected void onUpdateToolbar(){
// super.onUpdateToolbar();
super.onUpdateToolbar();
if (!canGoBack()) {
ImageView toolbarLogo=new ImageView(getActivity());
@@ -137,9 +137,11 @@ public class CustomLoginFragment extends InstanceCatalogFragment {
headerView.findViewById(R.id.more).setVisibility(View.GONE);
headerView.findViewById(R.id.visibility).setVisibility(View.GONE);
((TextView) headerView.findViewById(R.id.username)).setText("@moshidon");
headerView.findViewById(R.id.separator).setVisibility(View.GONE);
headerView.findViewById(R.id.timestamp).setVisibility(View.GONE);
headerView.findViewById(R.id.unread_indicator).setVisibility(View.GONE);
((TextView) headerView.findViewById(R.id.username)).setText(R.string.sk_app_username);
((TextView) headerView.findViewById(R.id.name)).setText(R.string.sk_app_name);
((TextView) headerView.findViewById(R.id.timestamp)).setText(R.string.time_now);
((ImageView) headerView.findViewById(R.id.avatar)).setImageDrawable(getActivity().getDrawable(R.mipmap.ic_launcher));
((FragmentStackActivity) getActivity()).invalidateSystemBarColors(this);
@@ -168,7 +170,7 @@ public class CustomLoginFragment extends InstanceCatalogFragment {
return mergeAdapter;
}
private class InstancesAdapter extends UsableRecyclerView.Adapter<InstanceViewHolder>{
private class InstancesAdapter extends UsableRecyclerView.Adapter<InstanceViewHolder> {
public InstancesAdapter(){
super(imgLoader);
}
@@ -204,11 +206,6 @@ public class CustomLoginFragment extends InstanceCatalogFragment {
public InstanceViewHolder(){
super(getActivity(), R.layout.item_instance_custom, list);
// itemView.setPadding(V.dp(16), V.dp(16), V.dp(16), V.dp(16));
// TypedValue value = new TypedValue();
// getActivity().getTheme().resolveAttribute(android.R.attr.selectableItemBackground, value, true);
// itemView.setBackground(getActivity().getTheme().getDrawable(R.drawable.bg_search_field));
title=findViewById(R.id.title);
description=findViewById(R.id.description);
userCount=findViewById(R.id.user_count);

View File

@@ -0,0 +1,63 @@
package org.joinmastodon.android.model;
import org.joinmastodon.android.api.RequiredField;
import org.parceler.Parcel;
import java.time.Instant;
import java.util.List;
@Parcel
public class Announcement extends BaseModel implements DisplayItemsParent {
@RequiredField
public String id;
@RequiredField
public String content;
public Instant startsAt;
public Instant endsAt;
public boolean published;
public boolean allDay;
public Instant publishedAt;
public Instant updatedAt;
public boolean read;
public List<Emoji> emojis;
public List<Mention> mentions;
public List<Hashtag> tags;
@Override
public String toString() {
return "Announcement{" +
"id='" + id + '\'' +
", content='" + content + '\'' +
", startsAt=" + startsAt +
", endsAt=" + endsAt +
", published=" + published +
", allDay=" + allDay +
", publishedAt=" + publishedAt +
", updatedAt=" + updatedAt +
", read=" + read +
", emojis=" + emojis +
", mentions=" + mentions +
", tags=" + tags +
'}';
}
public Status toStatus() {
Status s = new Status();
s.id = id;
s.mediaAttachments = List.of();
s.createdAt = startsAt != null ? startsAt : publishedAt;
if (updatedAt != null) s.editedAt = updatedAt;
s.content = s.text = content;
s.spoilerText = "";
s.visibility = StatusPrivacy.PUBLIC;
s.mentions = List.of();
s.tags = List.of();
s.emojis = List.of();
return s;
}
@Override
public String getID() {
return id;
}
}

View File

@@ -23,7 +23,8 @@ import org.joinmastodon.android.R;
import org.joinmastodon.android.api.requests.oauth.RevokeOauthToken;
import org.joinmastodon.android.api.session.AccountSession;
import org.joinmastodon.android.api.session.AccountSessionManager;
import org.joinmastodon.android.fragments.onboarding.CustomLoginFragment;
import org.joinmastodon.android.fragments.onboarding.CustomWelcomeFragment;
import org.joinmastodon.android.fragments.onboarding.CustomWelcomeFragment;
import org.joinmastodon.android.ui.utils.UiUtils;
import java.util.List;
@@ -77,7 +78,7 @@ public class AccountSwitcherSheet extends BottomSheet{
holder.avatar.setImageResource(R.drawable.ic_fluent_add_circle_24_filled);
holder.avatar.setImageTintList(ColorStateList.valueOf(UiUtils.getThemeColor(activity, android.R.attr.textColorPrimary)));
adapter.addAdapter(new ClickableSingleViewRecyclerAdapter(holder.itemView, ()->{
Nav.go(activity, CustomLoginFragment.class, null);
Nav.go(activity, CustomWelcomeFragment.class, null);
dismiss();
}));

View File

@@ -1,8 +1,9 @@
package org.joinmastodon.android.ui;
import static org.joinmastodon.android.GlobalUserPreferences.recentEmojis;
import android.annotation.SuppressLint;
import android.app.Activity;
import android.content.res.TypedArray;
import android.graphics.Rect;
import android.graphics.drawable.Animatable;
import android.graphics.drawable.Drawable;
@@ -12,8 +13,13 @@ import android.view.ViewGroup;
import android.widget.ImageView;
import android.widget.TextView;
import androidx.annotation.NonNull;
import androidx.recyclerview.widget.GridLayoutManager;
import androidx.recyclerview.widget.RecyclerView;
import com.squareup.otto.Subscribe;
import org.joinmastodon.android.GlobalUserPreferences;
import org.joinmastodon.android.R;
import org.joinmastodon.android.api.session.AccountSessionManager;
import org.joinmastodon.android.events.EmojiUpdatedEvent;
@@ -21,13 +27,13 @@ import org.joinmastodon.android.model.Emoji;
import org.joinmastodon.android.model.EmojiCategory;
import org.joinmastodon.android.ui.utils.UiUtils;
import java.util.ArrayList;
import java.util.Comparator;
import java.util.List;
import java.util.Optional;
import java.util.function.Consumer;
import java.util.stream.Collectors;
import androidx.annotation.NonNull;
import androidx.recyclerview.widget.GridLayoutManager;
import androidx.recyclerview.widget.RecyclerView;
import me.grishka.appkit.imageloader.ImageLoaderRecyclerAdapter;
import me.grishka.appkit.imageloader.ImageLoaderViewHolder;
import me.grishka.appkit.imageloader.ListImageLoaderWrapper;
@@ -40,6 +46,9 @@ import me.grishka.appkit.utils.V;
import me.grishka.appkit.views.UsableRecyclerView;
public class CustomEmojiPopupKeyboard extends PopupKeyboard{
//determines how many emoji need to be clicked, before it disappears from the recent emojis
private static final int NEW_RECENT_VALUE=15;
private List<EmojiCategory> emojis;
private UsableRecyclerView list;
private ListImageLoaderWrapper imgLoader;
@@ -82,6 +91,17 @@ public class CustomEmojiPopupKeyboard extends PopupKeyboard{
list.setLayoutManager(lm);
imgLoader=new ListImageLoaderWrapper(activity, list, new RecyclerViewDelegate(list), null);
// inject category with last used emojis
if (!recentEmojis.isEmpty()) {
List<Emoji> allAvailableEmojis = emojis.stream().flatMap(category -> category.emojis.stream()).collect(Collectors.toList());
List<Emoji> recentEmojiList = new ArrayList<>();
for (String emojiCode : recentEmojis.keySet().stream().sorted(Comparator.comparingInt(GlobalUserPreferences.recentEmojis::get).reversed()).collect(Collectors.toList())) {
Optional<Emoji> element = allAvailableEmojis.stream().filter(e -> e.shortcode.equals(emojiCode)).findFirst();
element.ifPresent(recentEmojiList::add);
}
emojis.add(0, new EmojiCategory(activity.getString(R.string.sk_emoji_recent), recentEmojiList));
}
for(EmojiCategory category:emojis)
adapter.addAdapter(new SingleCategoryAdapter(category));
list.setAdapter(adapter);
@@ -100,6 +120,11 @@ public class CustomEmojiPopupKeyboard extends PopupKeyboard{
list.setBackgroundColor(UiUtils.getThemeColor(activity, android.R.attr.colorBackground));
list.setSelector(null);
//remove recently used afterwards, it would get duplicated otherwise
if (!recentEmojis.isEmpty()) {
emojis.remove(0);
}
return list;
}
@@ -107,6 +132,19 @@ public class CustomEmojiPopupKeyboard extends PopupKeyboard{
this.listener=listener;
}
private void increaseEmojiCount(Emoji emoji) {
Integer usageCount = recentEmojis.get(emoji.shortcode);
if (usageCount != null) {
recentEmojis.put(emoji.shortcode, usageCount + 1);
} else {
recentEmojis.put(emoji.shortcode, NEW_RECENT_VALUE);
}
recentEmojis.entrySet().removeIf(e -> e.getValue() <= 0);
recentEmojis.replaceAll((k, v) -> v - 1);
GlobalUserPreferences.save();
}
@SuppressLint("NotifyDataSetChanged")
@Subscribe
public void onEmojiUpdated(EmojiUpdatedEvent ev){
@@ -203,6 +241,7 @@ public class CustomEmojiPopupKeyboard extends PopupKeyboard{
@Override
public void onClick(){
increaseEmojiCount(item);
listener.accept(item);
}
}

View File

@@ -1,6 +1,7 @@
package org.joinmastodon.android.ui.displayitems;
import android.content.Context;
import android.os.Build;
import android.os.SystemClock;
import android.view.View;
import android.view.ViewGroup;
@@ -9,6 +10,7 @@ import android.widget.SeekBar;
import android.widget.TextView;
import org.joinmastodon.android.AudioPlayerService;
import org.joinmastodon.android.MastodonApp;
import org.joinmastodon.android.R;
import org.joinmastodon.android.fragments.BaseStatusListFragment;
import org.joinmastodon.android.model.Attachment;
@@ -126,6 +128,10 @@ public class AudioStatusDisplayItem extends StatusDisplayItem{
lastKnownPositionTime=SystemClock.uptimeMillis();
this.playing=playing;
playPauseBtn.setImageResource(playing ? R.drawable.ic_fluent_pause_circle_24_filled : R.drawable.ic_fluent_play_circle_24_filled);
playPauseBtn.setContentDescription(MastodonApp.context.getResources().getString(playing ? R.string.pause : R.string.play));
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
playPauseBtn.setTooltipText(playPauseBtn.getContentDescription());
}
if(!playing){
lastRemainingSeconds=-1;
time.setText(formatDuration((int) item.attachment.getDuration()));

View File

@@ -2,6 +2,7 @@ package org.joinmastodon.android.ui.displayitems;
import android.annotation.SuppressLint;
import android.content.Context;
import android.os.Build;
import android.os.Bundle;
import android.text.SpannableStringBuilder;
import android.text.TextUtils;
@@ -100,6 +101,11 @@ public class ExtendedFooterStatusDisplayItem extends StatusDisplayItem{
case PRIVATE -> R.drawable.ic_fluent_people_checkmark_20_regular;
case DIRECT -> R.drawable.ic_fluent_mention_24_regular;
});
visibility.setContentDescription(UiUtils.getVisibilityText(s));
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
visibility.setTooltipText(visibility.getContentDescription());
}
}
@Override

View File

@@ -15,6 +15,9 @@ import android.view.ViewGroup;
import android.view.accessibility.AccessibilityNodeInfo;
import android.view.animation.AlphaAnimation;
import android.view.animation.Animation;
import android.view.animation.AnimationSet;
import android.view.animation.BounceInterpolator;
import android.view.animation.RotateAnimation;
import android.widget.Button;
import android.widget.FrameLayout;
import android.widget.ImageView;
@@ -58,6 +61,8 @@ public class FooterStatusDisplayItem extends StatusDisplayItem{
private final TextView reply, boost, favorite, bookmark;
private final ImageView share;
private static final Animation opacityOut, opacityIn;
private static AnimationSet animSet;
private View touchingView = null;
private boolean longClickPerformed = false;
@@ -86,6 +91,15 @@ public class FooterStatusDisplayItem extends StatusDisplayItem{
opacityIn = new AlphaAnimation(0.55f, 1);
opacityIn.setDuration(400);
opacityIn.setInterpolator(CubicBezierInterpolator.DEFAULT);
Animation spin = new RotateAnimation(0, 360,
Animation.RELATIVE_TO_SELF, 0.5f, Animation.RELATIVE_TO_SELF,
0.5f);
animSet = new AnimationSet(true);
animSet.setInterpolator(CubicBezierInterpolator.DEFAULT);
animSet.addAnimation(spin);
animSet.addAnimation(opacityIn);
animSet.setDuration(400);
}
public Holder(Activity activity, ViewGroup parent){
@@ -296,7 +310,15 @@ public class FooterStatusDisplayItem extends StatusDisplayItem{
private void onFavoriteClick(View v){
favorite.setSelected(!item.status.favourited);
AccountSessionManager.getInstance().getAccount(item.accountID).getStatusInteractionController().setFavorited(item.status, !item.status.favourited, r->{
v.startAnimation(opacityIn);
if (item.status.favourited) {
if(GlobalUserPreferences.reduceMotion){
v.startAnimation(opacityIn);
}else{
v.startAnimation(animSet);
}
} else {
v.startAnimation(opacityIn);
}
bindButton(favorite, r.favouritesCount);
});
}
@@ -363,4 +385,4 @@ public class FooterStatusDisplayItem extends StatusDisplayItem{
return 0;
}
}
}
}

View File

@@ -9,6 +9,7 @@ import android.os.Build;
import android.os.Bundle;
import android.text.SpannableStringBuilder;
import android.text.TextUtils;
import android.util.Log;
import android.view.Menu;
import android.view.MenuItem;
import android.view.SubMenu;
@@ -23,6 +24,7 @@ import android.widget.Toast;
import org.joinmastodon.android.GlobalUserPreferences;
import org.joinmastodon.android.R;
import org.joinmastodon.android.api.requests.accounts.GetAccountRelationships;
import org.joinmastodon.android.api.requests.announcements.DismissAnnouncement;
import org.joinmastodon.android.api.requests.statuses.CreateStatus;
import org.joinmastodon.android.api.requests.statuses.GetStatusSourceText;
import org.joinmastodon.android.api.session.AccountSession;
@@ -34,6 +36,7 @@ import org.joinmastodon.android.fragments.ProfileFragment;
import org.joinmastodon.android.fragments.ThreadFragment;
import org.joinmastodon.android.fragments.report.ReportReasonChoiceFragment;
import org.joinmastodon.android.model.Account;
import org.joinmastodon.android.model.Announcement;
import org.joinmastodon.android.model.Attachment;
import org.joinmastodon.android.model.Notification;
import org.joinmastodon.android.model.Relationship;
@@ -51,6 +54,7 @@ import java.time.format.FormatStyle;
import java.util.Collections;
import java.util.List;
import java.util.Locale;
import java.util.function.Consumer;
import me.grishka.appkit.Nav;
import me.grishka.appkit.api.APIRequest;
@@ -74,6 +78,8 @@ public class HeaderStatusDisplayItem extends StatusDisplayItem{
private String extraText;
private Notification notification;
private ScheduledStatus scheduledStatus;
private Announcement announcement;
private Consumer<String> consumeReadAnnouncement;
public HeaderStatusDisplayItem(String parentID, Account user, Instant createdAt, BaseStatusListFragment parentFragment, String accountID, Status status, String extraText, Notification notification, ScheduledStatus scheduledStatus){
super(parentID, parentFragment);
@@ -102,6 +108,13 @@ public class HeaderStatusDisplayItem extends StatusDisplayItem{
this.extraText=extraText;
}
public static HeaderStatusDisplayItem fromAnnouncement(Announcement a, Status fakeStatus, Account instanceUser, BaseStatusListFragment parentFragment, String accountID, Consumer<String> consumeReadID) {
HeaderStatusDisplayItem item = new HeaderStatusDisplayItem(a.id, instanceUser, a.startsAt, parentFragment, accountID, fakeStatus, null, null, null);
item.announcement = a;
item.consumeReadAnnouncement = consumeReadID;
return item;
}
@Override
public Type getType(){
return Type.HEADER;
@@ -121,8 +134,8 @@ public class HeaderStatusDisplayItem extends StatusDisplayItem{
}
public static class Holder extends StatusDisplayItem.Holder<HeaderStatusDisplayItem> implements ImageLoaderViewHolder{
private final TextView name, username, timestamp, extraText;
private final ImageView avatar, more, visibility, deleteNotification;
private final TextView name, username, timestamp, extraText, separator;
private final ImageView avatar, more, visibility, deleteNotification, unreadIndicator;
private final PopupMenu optionsMenu;
private Relationship relationship;
private APIRequest<?> currentRelationshipRequest;
@@ -138,11 +151,13 @@ public class HeaderStatusDisplayItem extends StatusDisplayItem{
super(activity, R.layout.display_item_header, parent);
name=findViewById(R.id.name);
username=findViewById(R.id.username);
separator=findViewById(R.id.separator);
timestamp=findViewById(R.id.timestamp);
avatar=findViewById(R.id.avatar);
more=findViewById(R.id.more);
visibility=findViewById(R.id.visibility);
deleteNotification=findViewById(R.id.delete_notification);
unreadIndicator=findViewById(R.id.unread_indicator);
extraText=findViewById(R.id.extra_text);
avatar.setOnClickListener(this::onAvaClick);
avatar.setOutlineProvider(roundCornersOutline);
@@ -267,6 +282,11 @@ public class HeaderStatusDisplayItem extends StatusDisplayItem{
public void onBind(HeaderStatusDisplayItem item){
name.setText(item.parsedName);
username.setText('@'+item.user.acct);
separator.setVisibility(View.VISIBLE);
username.setCompoundDrawablesWithIntrinsicBounds(item.user.bot ? R.drawable.ic_fluent_bot_24_filled : 0, 0, 0, 0);
if (item.scheduledStatus!=null)
if (item.scheduledStatus.scheduledAt.isAfter(CreateStatus.DRAFTS_AFTER_INSTANT)) {
timestamp.setText(R.string.sk_draft);
@@ -274,10 +294,14 @@ public class HeaderStatusDisplayItem extends StatusDisplayItem{
DateTimeFormatter formatter = DateTimeFormatter.ofLocalizedDateTime(FormatStyle.MEDIUM).withLocale(Locale.getDefault());
timestamp.setText(item.scheduledStatus.scheduledAt.atZone(ZoneId.systemDefault()).format(formatter));
}
else if(item.status==null || item.status.editedAt==null)
else if ((item.status==null || item.status.editedAt==null) && item.createdAt != null)
timestamp.setText(UiUtils.formatRelativeTimestamp(itemView.getContext(), item.createdAt));
else
else if (item.status != null && item.status.editedAt != null)
timestamp.setText(item.parentFragment.getString(R.string.edited_timestamp, UiUtils.formatRelativeTimestamp(itemView.getContext(), item.status.editedAt)));
else {
separator.setVisibility(View.GONE);
timestamp.setText("");
}
visibility.setVisibility(item.hasVisibilityToggle && !item.inset ? View.VISIBLE : View.GONE);
deleteNotification.setVisibility(GlobalUserPreferences.enableDeleteNotifications && item.notification!=null && !item.inset ? View.VISIBLE : View.GONE);
if(item.hasVisibilityToggle){
@@ -301,6 +325,42 @@ public class HeaderStatusDisplayItem extends StatusDisplayItem{
currentRelationshipRequest.cancel();
}
relationship=null;
String desc;
if (item.announcement != null) {
if (unreadIndicator.getVisibility() == View.GONE) {
more.setAlpha(0f);
unreadIndicator.setAlpha(0f);
unreadIndicator.setVisibility(View.VISIBLE);
}
float alpha = item.announcement.read ? 0 : 1;
more.setImageResource(R.drawable.ic_fluent_checkmark_20_filled);
desc = item.parentFragment.getString(R.string.sk_mark_as_read);
more.animate().alpha(alpha);
unreadIndicator.animate().alpha(alpha);
more.setOnClickListener(v -> {
new DismissAnnouncement(item.announcement.id).setCallback(new Callback<>() {
@Override
public void onSuccess(Object o) {
item.consumeReadAnnouncement.accept(item.announcement.id);
item.announcement.read = true;
rebind();
}
@Override
public void onError(ErrorResponse error) {
error.showToast(item.parentFragment.getActivity());
}
}).exec(item.accountID);
});
} else {
more.setImageResource(R.drawable.ic_fluent_more_vertical_20_filled);
desc = item.parentFragment.getString(R.string.more_options);
more.setOnClickListener(this::onMoreClick);
}
more.setContentDescription(desc);
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) more.setTooltipText(desc);
}
@Override
@@ -321,6 +381,10 @@ public class HeaderStatusDisplayItem extends StatusDisplayItem{
}
private void onAvaClick(View v){
if (item.announcement != null) {
UiUtils.openURL(item.parentFragment.getActivity(), item.parentFragment.getAccountID(), item.user.url);
return;
}
Bundle args=new Bundle();
args.putString("account", item.accountID);
args.putParcelable("profileAccount", Parcels.wrap(item.user));
@@ -352,6 +416,7 @@ public class HeaderStatusDisplayItem extends StatusDisplayItem{
}
private void updateOptionsMenu(){
if (item.announcement != null) return;
boolean hasMultipleAccounts = AccountSessionManager.getInstance().getLoggedInAccounts().size() > 1;
Menu menu=optionsMenu.getMenu();

View File

@@ -1,8 +1,10 @@
package org.joinmastodon.android.ui.text;
import android.content.Context;
import android.content.Intent;
import android.text.TextPaint;
import android.text.style.CharacterStyle;
import android.util.Log;
import android.view.View;
import org.joinmastodon.android.ui.utils.UiUtils;
@@ -32,7 +34,7 @@ public class LinkSpan extends CharacterStyle {
public void updateDrawState(TextPaint tp) {
tp.setColor(color=tp.linkColor);
}
public void onClick(Context context){
switch(getType()){
case URL -> UiUtils.openURL(context, accountID, link);
@@ -42,10 +44,16 @@ public class LinkSpan extends CharacterStyle {
}
public void onLongClick(View view) {
UiUtils.copyText(view, getType() == Type.URL ? link : text);
if (getType() == Type.URL) {
Intent shareIntent = new Intent(Intent.ACTION_SEND)
.setType("text/plain")
.putExtra(Intent.EXTRA_TEXT, link);
view.getContext().startActivity(Intent.createChooser(shareIntent, null));
} else {
UiUtils.copyText(view, text);
}
}
public String getLink(){
return link;
}

View File

@@ -498,7 +498,7 @@ public class UiUtils{
pinned ? R.string.sk_confirm_pin_post_title : R.string.sk_confirm_unpin_post_title,
pinned ? R.string.sk_confirm_pin_post : R.string.sk_confirm_unpin_post,
pinned ? R.string.sk_pin_post : R.string.sk_unpin_post,
pinned ? R.drawable.ic_fluent_pin_off_28_regular : R.drawable.ic_fluent_pin_28_regular,
pinned ? R.drawable.ic_fluent_pin_28_regular : R.drawable.ic_fluent_pin_off_28_regular,
()->{
new SetStatusPinned(status.id, pinned)
.setCallback(new Callback<>() {
@@ -1004,4 +1004,13 @@ public class UiUtils{
return false;
}
}
public static String getVisibilityText(Status status) {
return MastodonApp.context.getString(switch (status.visibility) {
case PUBLIC -> R.string.visibility_public;
case UNLISTED -> R.string.sk_visibility_unlisted;
case PRIVATE -> R.string.visibility_followers_only;
case DIRECT -> R.string.visibility_private;
});
}
}

View File

@@ -0,0 +1,10 @@
<?xml version="1.0" encoding="utf-8"?>
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
<item android:drawable="@drawable/ic_fluent_megaphone_24_regular" android:left="2dp" android:right="2dp" android:top="2dp" android:bottom="2dp"/>
<item android:width="14dp" android:height="14dp" android:gravity="top|right">
<shape android:shape="oval">
<stroke android:color="?android:colorPrimary" android:width="2dp"/>
<solid android:color="?android:colorAccent"/>
</shape>
</item>
</layer-list>

View File

@@ -0,0 +1,3 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android" android:width="20dp" android:height="20dp" android:viewportWidth="20" android:viewportHeight="20">
<path android:pathData="M14.69 11.503c1 0 1.81 0.81 1.81 1.81v0.689h-0.005c-0.034 0.78-0.248 1.757-1.123 2.555C14.416 17.43 12.765 18 10 18c-2.766 0-4.416-0.57-5.372-1.443-0.875-0.798-1.089-1.776-1.123-2.555H3.5v-0.69c0-0.999 0.81-1.809 1.81-1.809h9.38zM6.5 3C5.672 3 5 3.672 5 4.5v4C5 9.328 5.672 10 6.5 10h7c0.828 0 1.5-0.672 1.5-1.5v-4C15 3.672 14.328 3 13.5 3h-3V2.5C10.5 2.191 10.276 2 10 2S9.5 2.23 9.5 2.5V3h-3zM7 6.5c0-0.552 0.448-1 1-1s1 0.448 1 1-0.448 1-1 1-1-0.448-1-1zm4 0c0-0.552 0.448-1 1-1s1 0.448 1 1-0.448 1-1 1-1-0.448-1-1z" android:fillColor="@color/fluent_default_icon_tint"/>
</vector>

View File

@@ -3,7 +3,7 @@
android:height="20dp"
android:viewportWidth="20"
android:viewportHeight="20">
<path
android:pathData="M12,5.5C11.448,5.5 11,5.948 11,6.5C11,7.052 11.448,7.5 12,7.5C12.552,7.5 13,7.052 13,6.5C13,5.948 12.552,5.5 12,5.5ZM7,6.5C7,5.948 7.448,5.5 8,5.5C8.552,5.5 9,5.948 9,6.5C9,7.052 8.552,7.5 8,7.5C7.448,7.5 7,7.052 7,6.5ZM10.5,2.5C10.5,2.224 10.276,2 10,2C9.724,2 9.5,2.224 9.5,2.5V3H6.5C5.672,3 5,3.672 5,4.5V8.5C5,9.328 5.672,10 6.5,10H13.5C14.328,10 15,9.328 15,8.5V4.5C15,3.672 14.328,3 13.5,3H10.5V2.5ZM6.5,4H13.5C13.776,4 14,4.224 14,4.5V8.5C14,8.776 13.776,9 13.5,9H6.5C6.224,9 6,8.776 6,8.5V4.5C6,4.224 6.224,4 6.5,4ZM10.25,17.998C12.866,17.965 14.445,17.403 15.372,16.557C16.247,15.759 16.461,14.781 16.495,14.002H16.5V13.312C16.5,12.313 15.69,11.503 14.691,11.503H11.5V11.5H8.5V11.503H5.309C4.31,11.503 3.5,12.313 3.5,13.312V14.002H3.505C3.539,14.781 3.753,15.759 4.628,16.557C5.555,17.403 7.134,17.965 9.75,17.998V18H10.25V17.998ZM5.309,12.503H14.691C15.138,12.503 15.5,12.865 15.5,13.312V13.75C15.5,14.44 15.369,15.206 14.698,15.819C14.01,16.446 12.66,17 10,17C7.339,17 5.99,16.446 5.302,15.819C4.631,15.206 4.5,14.44 4.5,13.75V13.312C4.5,12.865 4.862,12.503 5.309,12.503Z"
android:fillColor="@color/fluent_default_icon_tint"/>
<path
android:pathData="M12,5.5C11.448,5.5 11,5.948 11,6.5C11,7.052 11.448,7.5 12,7.5C12.552,7.5 13,7.052 13,6.5C13,5.948 12.552,5.5 12,5.5ZM7,6.5C7,5.948 7.448,5.5 8,5.5C8.552,5.5 9,5.948 9,6.5C9,7.052 8.552,7.5 8,7.5C7.448,7.5 7,7.052 7,6.5ZM10.5,2.5C10.5,2.224 10.276,2 10,2C9.724,2 9.5,2.224 9.5,2.5V3H6.5C5.672,3 5,3.672 5,4.5V8.5C5,9.328 5.672,10 6.5,10H13.5C14.328,10 15,9.328 15,8.5V4.5C15,3.672 14.328,3 13.5,3H10.5V2.5ZM6.5,4H13.5C13.776,4 14,4.224 14,4.5V8.5C14,8.776 13.776,9 13.5,9H6.5C6.224,9 6,8.776 6,8.5V4.5C6,4.224 6.224,4 6.5,4ZM10.25,17.998C12.866,17.965 14.445,17.403 15.372,16.557C16.247,15.759 16.461,14.781 16.495,14.002H16.5V13.312C16.5,12.313 15.69,11.503 14.691,11.503H11.5V11.5H8.5V11.503H5.309C4.31,11.503 3.5,12.313 3.5,13.312V14.002H3.505C3.539,14.781 3.753,15.759 4.628,16.557C5.555,17.403 7.134,17.965 9.75,17.998V18H10.25V17.998ZM5.309,12.503H14.691C15.138,12.503 15.5,12.865 15.5,13.312V13.75C15.5,14.44 15.369,15.206 14.698,15.819C14.01,16.446 12.66,17 10,17C7.339,17 5.99,16.446 5.302,15.819C4.631,15.206 4.5,14.44 4.5,13.75V13.312C4.5,12.865 4.862,12.503 5.309,12.503Z"
android:fillColor="@color/fluent_default_icon_tint"/>
</vector>

View File

@@ -0,0 +1,9 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="20dp"
android:height="20dp"
android:viewportWidth="24"
android:viewportHeight="24">
<path
android:pathData="M17.753,14a2.25,2.25 0,0 1,2.25 2.25v0.905a3.75,3.75 0,0 1,-1.307 2.846C17.13,21.345 14.89,22 12,22c-2.89,0 -5.128,-0.656 -6.691,-2a3.75,3.75 0,0 1,-1.306 -2.843v-0.908A2.25,2.25 0,0 1,6.253 14h11.5ZM11.898,2.008 L12,2a0.75,0.75 0,0 1,0.743 0.648l0.007,0.102L12.75,3.5h3.5a2.25,2.25 0,0 1,2.25 2.25v4.505a2.25,2.25 0,0 1,-2.25 2.25h-8.5a2.25,2.25 0,0 1,-2.25 -2.25L5.5,5.75A2.25,2.25 0,0 1,7.75 3.5h3.5v-0.749a0.75,0.75 0,0 1,0.648 -0.743L12,2l-0.102,0.007ZM9.75,6.5a1.25,1.25 0,1 0,0 2.5,1.25 1.25,0 0,0 0,-2.5ZM14.243,6.5a1.25,1.25 0,1 0,0 2.499,1.25 1.25,0 0,0 0,-2.499Z"
android:fillColor="?android:textColorPrimary"/>
</vector>

View File

@@ -1,9 +0,0 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24"
android:viewportHeight="24">
<path
android:pathData="M17.753,13.999C18.996,13.999 20.003,15.007 20.003,16.249V17.154C20.003,18.248 19.526,19.287 18.696,20C17.131,21.344 14.89,22.001 12,22.001C9.111,22.001 6.872,21.344 5.309,20C4.481,19.288 4.004,18.25 4.004,17.157V16.249C4.004,15.007 5.011,13.999 6.254,13.999H17.753ZM17.753,15.499H6.254C5.84,15.499 5.504,15.835 5.504,16.249V17.157C5.504,17.812 5.79,18.435 6.287,18.863C7.545,19.944 9.441,20.501 12,20.501C14.56,20.501 16.458,19.944 17.719,18.862C18.217,18.434 18.503,17.811 18.503,17.154V16.249C18.503,15.835 18.168,15.499 17.753,15.499ZM11.899,2.007L12.001,2C12.38,2 12.694,2.282 12.744,2.648L12.751,2.75L12.75,3.499L16.25,3.5C17.493,3.5 18.5,4.507 18.5,5.75V10.254C18.5,11.497 17.493,12.504 16.25,12.504H7.75C6.508,12.504 5.5,11.497 5.5,10.254V5.75C5.5,4.507 6.508,3.5 7.75,3.5L11.25,3.499L11.251,2.75C11.251,2.37 11.533,2.057 11.899,2.007L12.001,2L11.899,2.007ZM16.25,5H7.75C7.336,5 7,5.335 7,5.75V10.254C7,10.668 7.336,11.004 7.75,11.004H16.25C16.665,11.004 17,10.668 17,10.254V5.75C17,5.335 16.665,5 16.25,5ZM9.75,6.5C10.44,6.5 10.999,7.059 10.999,7.749C10.999,8.439 10.44,8.998 9.75,8.998C9.06,8.998 8.5,8.439 8.5,7.749C8.5,7.059 9.06,6.5 9.75,6.5ZM14.242,6.5C14.932,6.5 15.492,7.059 15.492,7.749C15.492,8.439 14.932,8.998 14.242,8.998C13.552,8.998 12.993,8.439 12.993,7.749C12.993,7.059 13.552,6.5 14.242,6.5Z"
android:fillColor="@color/fluent_default_icon_tint"/>
</vector>

View File

@@ -0,0 +1,15 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24"
android:viewportHeight="24">
<path
android:pathData="M9.562,3C5.419,3 2.062,6.358 2.062,10.5C2.062,11.633 2.313,12.709 2.764,13.673C2.51,14.671 2.226,15.784 2.04,16.515C1.807,17.428 2.629,18.259 3.544,18.039C4.294,17.859 5.447,17.582 6.474,17.337C7.417,17.763 8.462,18 9.562,18C13.704,18 17.062,14.642 17.062,10.5C17.062,6.358 13.704,3 9.562,3ZM3.562,10.5C3.562,7.186 6.248,4.5 9.562,4.5C12.875,4.5 15.562,7.186 15.562,10.5C15.562,13.814 12.875,16.5 9.562,16.5C8.601,16.5 7.695,16.275 6.892,15.875L6.648,15.754L6.384,15.817C5.461,16.036 4.395,16.292 3.596,16.484C3.795,15.705 4.058,14.672 4.286,13.776L4.356,13.5L4.226,13.247C3.801,12.425 3.562,11.491 3.562,10.5ZM14.562,21C12.592,21 10.8,20.241 9.462,19C9.495,19 9.528,19 9.562,19C10.28,19 10.977,18.911 11.643,18.743C12.507,19.225 13.502,19.5 14.562,19.5C15.522,19.5 16.428,19.275 17.232,18.875L17.475,18.754L17.74,18.817C18.661,19.036 19.705,19.263 20.479,19.426C20.304,18.676 20.065,17.671 19.837,16.776L19.767,16.5L19.897,16.247C20.322,15.425 20.562,14.491 20.562,13.5C20.562,11.385 19.468,9.526 17.815,8.458C17.636,7.734 17.365,7.048 17.015,6.411C19.952,7.427 22.062,10.217 22.062,13.5C22.062,14.633 21.81,15.709 21.359,16.674C21.612,17.682 21.868,18.774 22.03,19.477C22.235,20.362 21.455,21.163 20.563,20.977C19.836,20.825 18.693,20.581 17.649,20.337C16.707,20.763 15.661,21 14.562,21Z"
android:fillColor="@color/fluent_default_icon_tint" />
<path
android:pathData="M7.297,8.312L11.85,8.312A0.75,0.75 0,0 1,12.6 9.062L12.6,9.062A0.75,0.75 0,0 1,11.85 9.812L7.297,9.812A0.75,0.75 0,0 1,6.547 9.062L6.547,9.062A0.75,0.75 0,0 1,7.297 8.312z"
android:fillColor="@color/fluent_default_icon_tint" />
<path
android:pathData="M7.297,11.312L10.323,11.312A0.75,0.75 0,0 1,11.073 12.062L11.073,12.062A0.75,0.75 0,0 1,10.323 12.812L7.297,12.812A0.75,0.75 0,0 1,6.547 12.062L6.547,12.062A0.75,0.75 0,0 1,7.297 11.312z"
android:fillColor="@color/fluent_default_icon_tint" />
</vector>

View File

@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<!--~ Copyright (c) 2022. ~ Microsoft Corporation. All rights reserved.-->
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:drawable="@drawable/ic_fluent_chat_multiple_24_regular_text" android:state_selected="true"/>
<item android:drawable="@drawable/ic_fluent_chat_multiple_24_regular"/>
</selector>

View File

@@ -0,0 +1,3 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android" android:width="20dp" android:height="20dp" android:viewportWidth="20" android:viewportHeight="20">
<path android:pathData="M7.032 13.907l-3.471-3.905C3.285 9.692 2.81 9.664 2.5 9.939 2.193 10.215 2.165 10.69 2.44 11l4 4.5c0.287 0.322 0.786 0.336 1.091 0.031l10.5-10.5c0.293-0.293 0.293-0.767 0-1.06-0.293-0.293-0.767-0.293-1.06 0l-9.938 9.937z" android:fillColor="@color/fluent_default_icon_tint"/>
</vector>

View File

@@ -0,0 +1,3 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android" android:width="20dp" android:height="20dp" android:viewportWidth="20" android:viewportHeight="20">
<path android:pathData="M13 10c0 1.657-1.343 3-3 3s-3-1.343-3-3 1.343-3 3-3 3 1.343 3 3z" android:fillColor="@color/fluent_default_icon_tint"/>
</vector>

View File

@@ -0,0 +1,12 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24"
android:viewportHeight="24">
<path
android:fillColor="@color/fluent_default_icon_tint"
android:pathData="M12,1.996C7.852,1.996 4.5,5.341 4.5,9.496L4.5,13.594L3.129,16.752A1.251,1.251 0,0 0,4.275 18.5L9,18.5L9.006,18.68A3,3 0,0 0,15 18.502L19.736,18.5A1.25,1.25 0,0 0,20.881 16.75L19.5,13.594L19.5,12.668A6.5,6.5 0,0 1,18 12.955L18,13.906L19.354,17L4.656,17L6,13.906L6,9.496C6,6.253 8.549,3.631 11.754,3.502A6.5,6.5 0,0 1,12.793 2.051A7.49,7.49 0,0 0,12 1.996zM13.5,18.5L13.494,18.646A1.5,1.5 0,0 1,10.5 18.502L13.5,18.5z" />
<path
android:fillColor="@color/fluent_default_icon_tint"
android:pathData="m17.5,2.189a4.311,4.311 0,1 0,4.282 3.809c-0.04,-0.35 0.213,-0.687 0.565,-0.687 0.306,0 0.576,0.213 0.612,0.517A5.5,5.5 0,1 1,20.918 2.191V1.891a0.595,0.595 0,1 1,1.19 0v1.604l0.02,0.031h-0.02V3.675A0.595,0.595 0,0 1,21.513 4.27h-1.784a0.595,0.595 0,1 1,0 -1.189h0.396a4.292,4.292 0,0 0,-2.626 -0.892z" />
</vector>

View File

@@ -0,0 +1,3 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android" android:width="24dp" android:height="24dp" android:viewportWidth="24" android:viewportHeight="24">
<path android:pathData="M21.907 5.622C21.969 5.83 22 6.046 22 6.263V17.74c0 1.242-1.007 2.25-2.25 2.25-0.217 0-0.433-0.032-0.641-0.094l-5.514-1.64C12.938 19.602 11.558 20.5 10 20.5c-2.142 0-3.891-1.683-3.995-3.8L6 16.5 5.999 16l-2.39-0.711C2.655 15.004 2 14.127 2 13.131V10.87c0-0.995 0.655-1.873 1.61-2.156l15.5-4.606c1.19-0.355 2.443 0.324 2.797 1.515zM7.499 16.445L7.5 16.499C7.5 17.88 8.62 19 10 19c0.885 0 1.678-0.464 2.124-1.179l-4.625-1.375zm12.037-10.9l-15.5 4.605C3.718 10.245 3.5 10.537 3.5 10.87v2.261c0 0.332 0.218 0.625 0.536 0.72l15.5 4.607c0.07 0.02 0.142 0.03 0.214 0.03 0.414 0 0.75-0.335 0.75-0.75V6.264c0-0.072-0.01-0.144-0.031-0.213-0.118-0.397-0.536-0.624-0.933-0.506z" android:fillColor="@color/fluent_default_icon_tint"/>
</vector>

View File

@@ -0,0 +1,3 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android" android:width="20dp" android:height="20dp" android:viewportWidth="20" android:viewportHeight="20">
<path android:pathData="M10 6.5c-0.966 0-1.75-0.784-1.75-1.75S9.034 3 10 3s1.75 0.784 1.75 1.75S10.966 6.5 10 6.5zM10 17c-0.966 0-1.75-0.784-1.75-1.75S9.034 13.5 10 13.5s1.75 0.784 1.75 1.75S10.966 17 10 17zm-1.75-7c0 0.966 0.784 1.75 1.75 1.75s1.75-0.784 1.75-1.75S10.966 8.25 10 8.25 8.25 9.034 8.25 10z" android:fillColor="@color/fluent_default_icon_tint"/>
</vector>

View File

@@ -1,5 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:orientation="horizontal"
android:layout_width="wrap_content"
android:layout_height="match_parent"
@@ -18,6 +19,8 @@
<ImageView
android:id="@+id/send_error"
android:tooltipText="@string/sk_sending_error"
android:contentDescription="@string/sk_sending_error"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginEnd="16dp"
@@ -52,6 +55,16 @@
android:contentDescription="@string/sk_schedule_or_draft"
android:tooltipText="@string/sk_schedule_or_draft" />
<TextView
android:id="@+id/char_counter"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textAppearance="@style/m3_body_large"
android:textColor="?android:textColorSecondary"
android:layout_marginHorizontal="8dp"
android:visibility="gone"
tools:text="500"/>
<Button
android:id="@+id/publish_btn"
android:layout_width="wrap_content"

View File

@@ -28,6 +28,8 @@
android:layout_marginTop="2dp"
android:layout_marginStart="2dp"
android:background="?android:selectableItemBackgroundBorderless"
android:contentDescription="@string/delete"
android:tooltipText="@string/delete"
android:tint="#D92C2C"
android:src="@drawable/ic_fluent_delete_20_regular"/>
@@ -105,7 +107,7 @@
android:layout_below="@id/retry_or_cancel_upload"
android:layout_marginTop="16dp"
android:textColor="?colorGray200"
android:textSize="14dp"
android:textSize="14sp"
android:gravity="center_horizontal"
android:singleLine="true"
android:ellipsize="end"
@@ -137,6 +139,7 @@
android:background="?android:selectableItemBackgroundBorderless"
android:tint="#D92C2C"
android:contentDescription="@string/delete"
android:tooltipText="@string/delete"
android:src="@drawable/ic_fluent_delete_20_regular"/>
</FrameLayout>

View File

@@ -20,6 +20,7 @@
android:layout_height="24dp"
android:layout_margin="16dp"
android:tint="?colorDarkIcon"
android:importantForAccessibility="no"
android:src="@drawable/ic_fluent_circle_24_regular"/>
<EditText
android:id="@+id/edit"
@@ -41,6 +42,7 @@
android:layout_height="56dp"
android:scaleType="center"
android:tint="?colorDarkIcon"
android:contentDescription="@string/reorder"
android:src="@drawable/ic_fluent_re_order_dots_vertical_24_regular"/>
</LinearLayout>

View File

@@ -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"

View File

@@ -18,7 +18,7 @@
android:background="?android:selectableItemBackgroundBorderless"
android:contentDescription="@string/more_options"
android:scaleType="center"
android:src="@drawable/ic_post_more"
android:src="@drawable/ic_fluent_more_vertical_20_filled"
android:tint="?android:textColorSecondary" />
<ImageView
@@ -47,10 +47,21 @@
android:src="@drawable/ic_visibility"
android:tint="?android:textColorSecondary" />
<ImageView
android:id="@+id/unread_indicator"
android:layout_width="36dp"
android:layout_height="36dp"
android:layout_marginTop="-6dp"
android:layout_toStartOf="@id/visibility"
android:visibility="gone"
android:tint="?android:colorAccent"
android:scaleType="center"
android:src="@drawable/ic_fluent_circle_small_20_filled" />
<ImageView
android:id="@+id/avatar"
android:layout_width="46dp"
android:layout_height="46dp"
android:layout_width="46sp"
android:layout_height="46sp"
android:layout_alignParentStart="true"
android:layout_alignParentTop="true"
android:layout_marginEnd="12dp" />
@@ -58,15 +69,17 @@
<org.joinmastodon.android.ui.views.HeaderSubtitleLinearLayout
android:id="@+id/name_wrap"
android:layout_width="match_parent"
android:layout_height="24dp"
android:layout_height="wrap_content"
android:layout_marginEnd="12dp"
android:layout_toStartOf="@id/visibility"
android:layout_toEndOf="@id/avatar">
android:layout_marginTop="2sp"
android:layout_toStartOf="@id/unread_indicator"
android:layout_toEndOf="@id/avatar"
android:minHeight="24sp">
<TextView
android:id="@+id/name"
android:layout_width="wrap_content"
android:layout_height="24dp"
android:layout_height="wrap_content"
android:ellipsize="end"
android:singleLine="true"
android:textAlignment="viewStart"
@@ -76,7 +89,7 @@
<TextView
android:id="@+id/extra_text"
android:layout_width="wrap_content"
android:layout_height="24dp"
android:layout_height="wrap_content"
android:layout_marginStart="8dp"
android:ellipsize="end"
android:fontFamily="sans-serif"
@@ -89,18 +102,19 @@
<org.joinmastodon.android.ui.views.HeaderSubtitleLinearLayout
android:layout_width="match_parent"
android:layout_height="20dp"
android:layout_height="wrap_content"
android:layout_below="@id/name_wrap"
android:layout_marginEnd="8dp"
android:layout_toStartOf="@id/visibility"
android:layout_toStartOf="@id/unread_indicator"
android:layout_toEndOf="@id/avatar"
android:layoutDirection="locale"
android:minHeight="20sp"
android:orientation="horizontal">
<TextView
android:id="@+id/username"
android:layout_width="wrap_content"
android:layout_height="20dp"
android:layout_height="wrap_content"
android:ellipsize="end"
android:singleLine="true"
android:textAppearance="@style/m3_title_small"
@@ -109,9 +123,9 @@
<TextView
android:id="@+id/separator"
android:layout_width="wrap_content"
android:layout_height="20dp"
android:layout_marginLeft="4dp"
android:layout_marginRight="4dp"
android:layout_height="wrap_content"
android:layout_marginLeft="4sp"
android:layout_marginRight="4sp"
android:importantForAccessibility="no"
android:text="·"
android:textAppearance="@style/m3_title_small" />
@@ -119,7 +133,7 @@
<TextView
android:id="@+id/timestamp"
android:layout_width="wrap_content"
android:layout_height="20dp"
android:layout_height="wrap_content"
android:singleLine="true"
android:textAppearance="@style/m3_title_small"
tools:text="3h" />

View File

@@ -56,10 +56,10 @@
<TextView
android:id="@+id/reply_text"
android:layout_width="match_parent"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginBottom="-12dp"
android:paddingHorizontal="16dp"
android:layout_marginStart="16dp"
android:paddingTop="16dp"
android:paddingBottom="6dp"
android:textAppearance="@style/m3_title_small"
@@ -68,8 +68,7 @@
android:drawableTint="?android:textColorSecondary"
android:drawablePadding="6dp"
android:singleLine="true"
android:ellipsize="end"
android:background="?android:selectableItemBackground"/>
android:ellipsize="end"/>
<RelativeLayout
android:layout_width="match_parent"
@@ -80,8 +79,8 @@
<ImageView
android:id="@+id/self_avatar"
android:layout_width="46dp"
android:layout_height="46dp"
android:layout_width="46sp"
android:layout_height="46sp"
android:layout_alignParentStart="true"
android:layout_alignParentTop="true"
android:layout_marginEnd="12dp" />
@@ -89,8 +88,9 @@
<TextView
android:id="@+id/self_name"
android:layout_width="match_parent"
android:layout_height="24dp"
android:layout_height="wrap_content"
android:layout_toEndOf="@id/self_avatar"
android:minHeight="24sp"
android:ellipsize="end"
android:singleLine="true"
android:textAppearance="@style/m3_title_medium"
@@ -99,9 +99,10 @@
<TextView
android:id="@+id/self_username"
android:layout_width="match_parent"
android:layout_height="20dp"
android:layout_height="wrap_content"
android:layout_below="@id/self_name"
android:layout_toEndOf="@id/self_avatar"
android:minHeight="20sp"
android:ellipsize="end"
android:singleLine="true"
android:textAppearance="@style/m3_title_small"
@@ -153,6 +154,7 @@
android:layout_marginBottom="8dp"
android:background="@drawable/bg_poll_option_clickable"
android:outlineProvider="background"
android:contentDescription="@string/sk_poll_option_add"
android:elevation="2dp">
<ImageView
android:id="@+id/add_poll_option_icon"
@@ -160,6 +162,7 @@
android:layout_height="24dp"
android:layout_margin="16dp"
android:tint="?colorDarkIcon"
android:importantForAccessibility="no"
android:src="@drawable/ic_fluent_add_circle_24_regular"/>
</LinearLayout>
<TextView
@@ -420,6 +423,7 @@
android:layout_height="wrap_content"
android:textAppearance="@style/m3_body_large"
android:textColor="?android:textColorSecondary"
android:visibility="gone"
tools:text="500"/>
<Button
@@ -429,6 +433,7 @@
android:layout_marginStart="12dp"
android:visibility="gone"
android:tooltipText="@string/publish"
android:contentDescription="@string/publish"
android:drawableStart="@drawable/ic_fluent_send_24_selector"
/>

View File

@@ -36,7 +36,7 @@
android:hint="@string/search_hint"
android:textColorHint="?colorSearchHint"
android:textColor="?android:textColorPrimary"
android:textSize="16dp"
android:textSize="16sp"
android:singleLine="true"
android:inputType="textFilter"
android:imeOptions="actionSearch"

View File

@@ -45,7 +45,7 @@
android:textColor="?colorGray50t"
android:textAllCaps="true"
android:fontFamily="sans-serif-medium"
android:textSize="14dp"
android:textSize="14sp"
android:gravity="center"
android:background="@drawable/bg_profile_follows_you"
android:visibility="gone"
@@ -176,18 +176,16 @@
<FrameLayout
android:clipToPadding="false"
android:paddingVertical="16dp"
android:paddingLeft="8dp"
android:paddingLeft="16dp"
android:paddingRight="4dp"
android:layout_width="wrap_content"
android:layout_height="wrap_content">
<org.joinmastodon.android.ui.views.ProgressBarButton
android:id="@+id/notify_btn"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:drawableStart="@drawable/ic_fluent_alert_24_selector"
android:paddingHorizontal="8dp"
tools:ignore="SpeakableTextPresentCheck" />
android:drawableStart="@drawable/ic_fluent_alert_24_selector" />
<ProgressBar
android:id="@+id/notify_progress"
@@ -200,7 +198,6 @@
android:indeterminateTint="?colorButtonText"
android:outlineProvider="none"
android:visibility="gone" />
</FrameLayout>
<FrameLayout
@@ -210,7 +207,6 @@
android:paddingLeft="4dp"
android:layout_width="wrap_content"
android:layout_height="wrap_content">
<org.joinmastodon.android.ui.views.ProgressBarButton
android:id="@+id/profile_action_btn"
android:layout_width="wrap_content"
@@ -231,44 +227,26 @@
</FrameLayout>
</LinearLayout>
<LinearLayout
android:id="@id/name_wrap"
android:layout_width="wrap_content"
<TextView
android:id="@+id/name"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@id/avatar_border"
android:layout_alignParentStart="true"
android:layout_marginStart="16dp"
android:layout_marginTop="17dp"
android:layout_marginBottom="0.4dp"
android:layout_toStartOf="@id/profile_action_btn_wrap"
android:layout_alignParentEnd="true">
<TextView
android:id="@+id/name"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="16dp"
android:layout_marginTop="17dp"
android:layout_marginBottom="0.4dp"
android:layout_marginEnd="0dp"
android:textAlignment="viewStart"
android:textAppearance="@style/m3_headline_small"
tools:text="Eugen" />
<Button
android:id="@+id/bot_icon"
android:layout_width="wrap_content"
android:layout_height="28dp"
android:layout_marginTop="14dp"
android:paddingHorizontal="8dp"
android:background="?colorWindowBackground"
android:drawableStart="@drawable/ic_fluent_bot_24_regular"
/>
</LinearLayout>
android:textAlignment="viewStart"
android:textAppearance="@style/m3_headline_small"
tools:text="Eugen" />
<TextView
android:id="@+id/username"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="16dp"
android:layout_below="@id/name_wrap"
android:layout_below="@id/name"
android:paddingTop="4dp"
android:paddingBottom="8dp"
android:textAppearance="@style/m3_title_medium"
@@ -340,7 +318,11 @@
</LinearLayout>
</org.joinmastodon.android.ui.views.NestedRecyclerScrollView>
<ImageButton android:id="@+id/fab" style="@style/Widget.Mastodon.Button.Compose"/>
<ImageButton
android:tooltipText="@string/sk_fab_compose"
android:contentDescription="@string/sk_fab_compose"
android:id="@+id/fab"
style="@style/Widget.Mastodon.Button.Compose"/>
</FrameLayout>
</me.grishka.appkit.views.RecursiveSwipeRefreshLayout>

View File

@@ -14,8 +14,7 @@
android:layout_height="wrap_content"
android:layout_marginHorizontal="16dp"
android:layout_marginVertical="12dp"
android:text="@string/sk_welcome_title"
/>
android:text="@string/sk_welcome_title" />
<TextView
style="@style/m3_body_large"

View File

@@ -19,7 +19,7 @@
android:layout_height="wrap_content"
android:layout_weight="1"
android:layout_marginStart="24dp"
android:textSize="16dp"
android:textSize="16sp"
android:textColor="?android:textColorPrimary"
android:singleLine="true"
android:ellipsize="end"/>

View File

@@ -91,6 +91,7 @@
android:layout_marginStart="16dp"
android:layout_marginTop="16dp"
android:gravity="center_horizontal"
android:layout_weight="1"
android:orientation="vertical">
<TextView
@@ -115,6 +116,7 @@
android:layout_marginTop="16dp"
android:layout_marginStart="12dp"
android:orientation="vertical"
android:layout_weight="1"
android:gravity="center_horizontal">
<TextView
android:id="@+id/followers_count"
@@ -138,6 +140,7 @@
android:layout_marginTop="16dp"
android:layout_marginStart="12dp"
android:orientation="vertical"
android:layout_weight="1"
android:gravity="center_horizontal">
<TextView
android:id="@+id/following_count"
@@ -225,7 +228,9 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="8dp"
android:layout_marginEnd="8dp"
android:padding="8dp"
android:layout_weight="1"
android:clipToPadding="false">
<org.joinmastodon.android.ui.views.ProgressBarButton

View File

@@ -6,7 +6,7 @@
android:singleLine="true"
android:ellipsize="end"
android:fontFamily="sans-serif-medium"
android:textSize="12dp"
android:textSize="12sp"
android:textColor="?android:textColorSecondary"
android:textAllCaps="true"
android:paddingTop="24dp"

View File

@@ -11,6 +11,7 @@
android:id="@+id/emoji"
android:layout_width="24dp"
android:layout_height="24dp"
android:importantForAccessibility="no"
android:layout_marginBottom="6dp"
android:layout_gravity="center_horizontal"/>
@@ -22,7 +23,7 @@
android:textAllCaps="true"
android:textColor="?android:textColorPrimary"
android:fontFamily="sans-serif-medium"
android:textSize="14dp"
android:textSize="14sp"
android:gravity="center_vertical"
android:singleLine="true"
android:ellipsize="end"

View File

@@ -11,6 +11,7 @@
android:layout_height="24dp"
android:layout_alignParentStart="true"
android:layout_centerVertical="true"
android:importantForAccessibility="no"
android:tint="?android:textColorSecondary"
android:src="@drawable/ic_round_checkbox"/>

View File

@@ -12,13 +12,13 @@
<TextView
android:id="@+id/number"
android:layout_width="24dp"
android:layout_height="24dp"
android:layout_width="24sp"
android:layout_height="wrap_content"
android:layout_marginEnd="16dp"
android:textColor="?android:colorAccent"
android:fontFamily="sans-serif-condensed"
android:textStyle="bold"
android:textSize="22dp"
android:textSize="22sp"
android:gravity="center"
android:includeFontPadding="false"
tools:text="1"/>

View File

@@ -14,7 +14,7 @@
android:layout_marginEnd="8dp"
android:gravity="center_vertical"
android:textColor="?android:textColorPrimary"
android:textSize="20dp"
android:textSize="20sp"
android:fontFamily="sans-serif-medium"
android:singleLine="true"
android:ellipsize="end"
@@ -26,7 +26,7 @@
android:layout_height="32dp"
android:background="@drawable/bg_inline_button"
android:textColor="?android:textColorPrimary"
android:textSize="20dp"
android:textSize="20sp"
android:fontFamily="sans-serif-medium"
android:paddingLeft="4dp"
android:paddingRight="4dp"

View File

@@ -28,6 +28,7 @@
/>
<ImageView
android:id="@+id/icon"
android:importantForAccessibility="no"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
</LinearLayout>

View File

@@ -10,6 +10,7 @@
android:layout_width="100dp"
android:layout_height="121dp"
android:elevation="1dp"
android:importantForAccessibility="no"
android:foreground="?android:selectableItemBackground"
android:duplicateParentState="true"
tools:src="@drawable/theme_auto"/>

View File

@@ -20,6 +20,10 @@
android:layout_height="match_parent"
android:id="@+id/empty"/>
<ImageButton android:id="@+id/fab" style="@style/Widget.Mastodon.Button.Compose"/>
<ImageButton
android:contentDescription="@string/sk_fab_compose"
android:tooltipText="@string/sk_fab_compose"
android:id="@+id/fab"
style="@style/Widget.Mastodon.Button.Compose"/>
</FrameLayout>
</me.grishka.appkit.views.RecursiveSwipeRefreshLayout>

View File

@@ -71,6 +71,7 @@
android:layout_width="28dp"
android:layout_height="28dp"
android:layout_gravity="center"
android:importantForAccessibility="no"
android:scaleType="centerCrop"
android:src="@null"/>
<View

View File

@@ -1,5 +1,10 @@
<?xml version="1.0" encoding="utf-8"?>
<menu xmlns:android="http://schemas.android.com/apk/res/android">
<item
android:id="@+id/announcements"
android:icon="@drawable/ic_fluent_megaphone_24_regular"
android:showAsAction="always"
android:title="@string/sk_announcements" />
<item
android:id="@+id/settings"
android:icon="@drawable/ic_fluent_settings_24_regular"

View File

@@ -4,14 +4,14 @@
<string name="sk_pinned_posts">Angeheftet</string>
<string name="sk_delete_and_redraft">Löschen und neu erstellen</string>
<string name="sk_confirm_delete_and_redraft_title">Beitrag löschen und neu erstellen</string>
<string name="sk_confirm_delete_and_redraft">Bist du dir sicher, dass du diesen Beitrag löschen und neu erstellen möchtest?</string>
<string name="sk_confirm_delete_and_redraft">Bist du dir sicher, dass du diesen Beitrag löschen und neu erstellen möchtest\?</string>
<string name="sk_pin_post">An Profil anheften</string>
<string name="sk_confirm_pin_post_title">Beitrag an Profil anheften</string>
<string name="sk_confirm_pin_post">Möchtest du den Beitrag an dein Profil anheften?</string>
<string name="sk_pinning">Wird angeheftet…</string>
<string name="sk_unpin_post">Von Profil lösen</string>
<string name="sk_confirm_unpin_post_title">Angehefteten Beitrag von Profil lösen</string>
<string name="sk_confirm_unpin_post">Bist du dir sicher, dass du den angehefteten Beitrag von deinem Profil lösen möchtest?</string>
<string name="sk_confirm_unpin_post">Bist du dir sicher, dass du den angehefteten Beitrag von deinem Profil lösen möchtest\?</string>
<string name="sk_unpinning">Wird vom Profil gelöst…</string>
<string name="sk_image_description">Bildbeschreibung</string>
<string name="sk_visibility_unlisted">Nicht gelistet</string>
@@ -37,7 +37,7 @@
<string name="sk_lists_with_user">Listen mit %s</string>
<string name="sk_settings_always_reveal_content_warnings">Inhaltswarnungen immer ausklappen</string>
<string name="sk_disable_marquee">Laufschrift in Titelleisten deaktivieren</string>
<string name="sk_disable_dividers">Tröt Trennung deaktivieren</string>
<string name="sk_disable_dividers">Beitrags Trennung deaktivieren</string>
<string name="sk_relocate_publish_button">Veröffentlichen Schaltfläche verschieben</string>
<string name="sk_settings_contribute">Zu Moshidon beitragen</string>
<string name="sk_settings_show_federated_timeline">Föderierte Timeline anzeigen</string>
@@ -78,7 +78,7 @@
<string name="sk_delete_notification_confirm">Benachrichtigung wirklich löschen\?</string>
<string name="sk_clear_all_notifications">Alle Benachrichtigungen löschen</string>
<string name="sk_clear_all_notifications_confirm_action">Alle löschen</string>
<string name="sk_clear_all_notifications_confirm">Wirklich alle Benachrichtigungen löschen?</string>
<string name="sk_clear_all_notifications_confirm">Wirklich alle Benachrichtigungen löschen\?</string>
<string name="sk_enable_delete_notifications">Löschen von Benachrichtigungen aktivieren</string>
<string name="sk_settings_publish_button_text">Veröffentlichen-Button-Text</string>
<string name="sk_settings_publish_button_text_title">Veröffentlichen-Button-Text anpassen</string>
@@ -129,4 +129,16 @@
<string name="sk_compose_no_schedule">Nicht planen</string>
<string name="sk_compose_no_draft">Nicht entwerfen</string>
<string name="sk_settings_reduce_motion">Bewegungen in Animationen reduzieren</string>
</resources>
<string name="sk_bot_account">Dies ist ein Bot-Konto</string>
<string name="sk_no_image_desc_title">Keine Bildbeschreibung</string>
<string name="sk_no_image_desc">Die enthaltenen Bilder haben keine Beschreibung. Bitte füge eine Beschreibung hinzu, damit auch sehbehinderte Personen teilnehmen können.</string>
<string name="sk_emoji_recent">Kürzlich verwendet</string>
<string name="sk_clear_recent_emoji">Kürzlich verwendete Emojis löschen</string>
<string name="sk_disable_relocate_publish_button_to_enable_customization">Deaktiviere die Funktion "Veröffentlichen Schaltfläche verschieben", um eine Anpassung zu ermöglichen.</string>
<string name="sk_keep_only_latest_notification">Nur neueste Benachrichtigung behalten</string>
<string name="sk_announcements">Ankündigungen</string>
<string name="sk_mark_as_read">Als gelesen markieren</string>
<string name="sk_poll_option_add">Neue Umfrageoption hinzufügen</string>
<string name="sk_fab_compose">Verfassen</string>
<string name="sk_sending_error">Fehler beim Veröffentlichen</string>
</resources>

View File

@@ -37,7 +37,7 @@
<string name="sk_lists_with_user">Lists with %s</string>
<string name="sk_settings_always_reveal_content_warnings">Always reveal content warnings</string>
<string name="sk_disable_marquee">Disable scrolling text in title bars</string>
<string name="sk_disable_dividers">Disable toot dividers</string>
<string name="sk_disable_dividers">Disable post dividers</string>
<string name="sk_relocate_publish_button">Relocate publish button</string>
<string name="sk_settings_contribute">Contribute to Moshidon</string>
<string name="sk_settings_show_federated_timeline">Show federated timeline</string>
@@ -65,7 +65,7 @@
<string name="sk_welcome_title">Welcome!</string>
<string name="sk_welcome_text">The shark salutes you! To get started, please enter your home instances domain name below.</string>
<string name="sk_example_domain">example.social</string>
<string name="sk_app_username" translatable="false">\@megalodon</string>
<string name="sk_app_username" translatable="false">\@moshidon</string>
<string name="sk_tabs_disable_swipe">Disable swiping between tabs</string>
<string name="sk_settings_profile">Set up profile</string>
<string name="sk_settings_posting">Posting preferences</string>
@@ -131,4 +131,18 @@
<string name="sk_compose_no_draft">Dont draft</string>
<string name="sk_settings_reduce_motion">Reduce motion in animations</string>
<string name="sk_bot_account">This is a bot account</string>
<string name="sk_no_image_desc_title">No Image description</string>
<string name="sk_no_image_desc">The included images have no description. Please consider adding one, to allow visually impaired people to participate.</string>
<string name="sk_emoji_recent">Recently used</string>
<string name="sk_clear_recent_emoji">Clear recently used emoji</string>
<string name="sk_disable_relocate_publish_button_to_enable_customization">Disable "Relocate publish button" to allow customization</string>
<string name="sk_keep_only_latest_notification">Keep only latest notification</string>
<string name="sk_announcements">Announcements</string>
<string name="sk_mark_as_read">Mark as read</string>
<!-- accessibility labels-->
<string name="sk_poll_option_add">Add new poll option</string>
<string name="sk_fab_compose">Compose</string>
<string name="sk_sending_error">Error publishing</string>
</resources>

View File

@@ -381,7 +381,7 @@
<style name="Widget.Mastodon.M3.Button" parent="android:Widget.Material.Button">
<item name="android:textAllCaps">false</item>
<item name="android:textSize">14dp</item>
<item name="android:textSize">14sp</item>
<item name="android:minHeight">40dp</item>
<item name="android:fontFamily">sans-serif-medium</item>
<item name="android:stateListAnimator">@null</item>
@@ -403,45 +403,45 @@
<style name="alert_title">
<item name="android:textColor">?android:textColorPrimary</item>
<item name="android:textSize">24dp</item>
<item name="android:textSize">24sp</item>
<item name="android:minHeight">38dp</item>
<item name="android:gravity">center_vertical</item>
</style>
<style name="m3_body_large">
<item name="android:textSize">16dp</item>
<item name="android:textSize">16sp</item>
<item name="android:textColor">?android:textColorPrimary</item>
<item name="android:lineSpacingExtra">5dp</item>
</style>
<style name="m3_body_medium">
<item name="android:textSize">14dp</item>
<item name="android:textSize">14sp</item>
<item name="android:textColor">?android:textColorPrimary</item>
<item name="android:lineSpacingExtra">4dp</item>
</style>
<style name="m3_body_small">
<item name="android:textSize">12dp</item>
<item name="android:textSize">12sp</item>
<item name="android:textColor">?android:textColorSecondary</item>
<item name="android:lineSpacingExtra">2dp</item>
</style>
<style name="m3_title_medium">
<item name="android:fontFamily">sans-serif-medium</item>
<item name="android:textSize">16dp</item>
<item name="android:textSize">16sp</item>
<item name="android:textColor">?android:textColorPrimary</item>
<item name="android:lineSpacingExtra">5dp</item>
</style>
<style name="m3_title_small">
<item name="android:fontFamily">sans-serif-medium</item>
<item name="android:textSize">14dp</item>
<item name="android:textSize">14sp</item>
<item name="android:textColor">?android:textColorSecondary</item>
</style>
<style name="m3_label_medium">
<item name="android:fontFamily">sans-serif-medium</item>
<item name="android:textSize">12dp</item>
<item name="android:textSize">12sp</item>
<item name="android:textColor">?android:textColorPrimary</item>
<item name="android:lineSpacingMultiplier">1.14</item>
</style>
@@ -449,12 +449,12 @@
<style name="m3_label_large">
<item name="android:fontFamily">sans-serif-medium</item>
<item name="android:textColor">?android:textColorSecondary</item>
<item name="android:textSize">14dp</item>
<item name="android:textSize">14sp</item>
</style>
<style name="m3_title_large">
<item name="android:fontFamily">sans-serif-medium</item>
<item name="android:textSize">22dp</item>
<item name="android:textSize">22sp</item>
<item name="android:textColor">?android:textColorPrimary</item>
</style>
@@ -465,12 +465,12 @@
</style>
<style name="m3_headline_small">
<item name="android:textSize">24dp</item>
<item name="android:textSize">24sp</item>
<item name="android:textColor">?android:textColorPrimary</item>
</style>
<style name="m3_headline_medium">
<item name="android:textSize">28dp</item>
<item name="android:textSize">28sp</item>
<item name="android:textColor">?android:textColorPrimary</item>
<item name="android:lineSpacingExtra">3dp</item>
</style>

View File

@@ -3,7 +3,7 @@ Release 82 adds a lot of features from upstream, such as:
- A settings page rework
- The ability to choose the publish button text
- The ability to reduce animations
- A bot icon for bot account profiles
- A bot icon for bot account profiles! Thanks @FineFindus
- And updated German translation! Thanks @dantobi
- A lot of minor UI improvements
- Major usability improvements, as the ability to hold action buttons to interact with another account

View File

@@ -0,0 +1,4 @@
Release 83 brings some minor improvements, such as:
- Fixing crashing issues when clicking mentions
- Reworking the bot icon
- Adding a reminder to add an image description if you post an attachment allow visually impaired people to better participate. Thanks @FineFindus!

View File

@@ -0,0 +1,3 @@
Release 84 fixes a few bugs, such as:
- Login callback not working
- Updating german translation. Thanks @DanTobi!

View File

@@ -0,0 +1,7 @@
New stuff that comes with Release 85:
Adding long click search button to bring up the keyboard
Clicking the search button when already in search tab also brings up keyboard
Bringing up a bot icon to toots from bot accounts, Thanks @FineFindus!
Improving visibility of bot icon inside account profile, Thanks @FineFindus!
Updating german translation, Thanks @Dontobi!
Fixing minor UI issues

View File

@@ -0,0 +1,4 @@
New things for release 86:
- Ability to stack notifications, ie: having multiple notifications;
- Introducing Announcements;
- Many minor UI fixes.