Compare commits

...

187 Commits

Author SHA1 Message Date
LucasGGamerM
3d4742e8f7 Metada improvements for 81 2022-12-29 14:08:19 -03:00
LucasGGamerM
a6f1c21e1c Bumping version number 2022-12-29 14:06:33 -03:00
LucasGGamerM
a0b62ab434 Merge branch 'feature/publish_button_improvements' 2022-12-29 14:04:08 -03:00
LucasGGamerM
0b8501e92b Merge branch 'feature/show_changelog_button' 2022-12-29 14:01:34 -03:00
LucasGGamerM
9a0851cb06 Fixing some padding issues with the changelog 2022-12-29 14:00:53 -03:00
LucasGGamerM
e4340f5015 After hours of looking at the code, i found how to fix it 2022-12-29 13:56:18 -03:00
LucasGGamerM
014398e050 I dont know what i am doing with my life 2022-12-28 22:54:40 -03:00
LucasGGamerM
4f77370977 Its a lot less broken than before 2022-12-28 22:26:49 -03:00
LucasGGamerM
5937215d3a I have done something here 2022-12-28 21:50:59 -03:00
LucasGGamerM
ade1ce8e05 Adding a send icon. Still havent made use of it though 2022-12-28 21:33:55 -03:00
LucasGGamerM
a4581dc61b More changes to the 80 changelog 2022-12-28 20:33:19 -03:00
LucasGGamerM
50d4130b3f Making the relocated button default 2022-12-28 20:14:45 -03:00
LucasGGamerM
1147087531 Update settings page screenshot 2022-12-28 20:07:22 -03:00
LucasGGamerM
4653a22635 Merge pull request #12 from dontobi/master
Adding some german translation
2022-12-28 20:06:29 -03:00
LucasGGamerM
e79501857f Adding changelog for the 80th release of Moshidon! 2022-12-28 19:58:53 -03:00
LucasGGamerM
a8c05f6a32 Bump version number 2022-12-28 19:55:27 -03:00
LucasGGamerM
c1d98cad00 Its now optional! 2022-12-28 19:49:38 -03:00
LucasGGamerM
fb54948f86 Its now in the bottom. Time to make it optional 2022-12-28 18:42:13 -03:00
dontobi
ca5f189e70 German translation 2022-12-28 16:24:58 +01:00
LucasGGamerM
a70bd4f906 Merge remote-tracking branch 'origin/master' 2022-12-27 20:41:34 -03:00
LucasGGamerM
4adac359e3 Adding changelog for 79 2022-12-27 20:41:22 -03:00
LucasGGamerM
9adaf12c00 Bump version number 2022-12-27 20:40:27 -03:00
LucasGGamerM
8bbfa2e417 Adding a donate button 2022-12-27 20:39:52 -03:00
LucasGGamerM
e1ca97f323 Update FUNDING.yml 2022-12-27 19:28:55 -03:00
LucasGGamerM
677621f2da Update _config.yml
Rebranding
2022-12-27 15:18:55 -03:00
LucasGGamerM
d40138dd99 Getting screenshots and icon metadata ready 2022-12-27 14:46:15 -03:00
LucasGGamerM
d957e8f2fc Making changelogs and stuff ready for fdroid release 2022-12-26 20:23:31 -03:00
LucasGGamerM
681c327306 Bump version number 2022-12-26 11:11:23 -03:00
LucasGGamerM
80c9afec7b Found an icon and changed the name of the setting. 2022-12-26 11:05:29 -03:00
LucasGGamerM
eea8041abe Its in the settings page as well. All I need to do now is find an icon for it 2022-12-26 10:41:03 -03:00
LucasGGamerM
1309bfe1ee Its in the global user preferences now, still not in the settings page 2022-12-26 10:33:04 -03:00
LucasGGamerM
70d3ef9984 Removing the divider by making it invisible 2022-12-26 10:27:13 -03:00
LucasGGamerM
52ac5f16e5 Rebumping version number twice, because of the downgrade made so I could test the show changelog feature. 2022-12-25 16:03:04 -03:00
LucasGGamerM
ea43070e6d More polishes over the Changelog feature 2022-12-25 16:01:22 -03:00
LucasGGamerM
14cd23c28b Its working. Still needs some polish though! 2022-12-25 15:39:45 -03:00
LucasGGamerM
793668021e Rolling back version graddle for testing the changelog thing. Will bump it later 2022-12-25 15:03:02 -03:00
LucasGGamerM
f0ea6ef43e Revert "Getting changelogs commit number 1"
This reverts commit e8a31cf867.
2022-12-25 14:21:09 -03:00
LucasGGamerM
2b2e4845a1 Revert "Its some steps done"
This reverts commit d66a4c0920.
2022-12-25 14:21:09 -03:00
LucasGGamerM
2dccec99cc Revert "Just no"
This reverts commit c5fcf49eda.
2022-12-25 14:21:09 -03:00
LucasGGamerM
b060894a6c Merge remote-tracking branch 'origin/feature/show_changelog_button' into feature/show_changelog_button 2022-12-25 14:18:59 -03:00
LucasGGamerM
92872edb58 Something is gonna come out of it this time. I am sure of it 2022-12-25 14:16:50 -03:00
LucasGGamerM
c5fcf49eda Just no 2022-12-25 11:58:23 -03:00
LucasGGamerM
d66a4c0920 Its some steps done 2022-12-25 11:11:30 -03:00
LucasGGamerM
e8a31cf867 Getting changelogs commit number 1 2022-12-24 23:41:41 -03:00
LucasGGamerM
c1f9a88ef4 Bump version number 2022-12-24 11:48:44 -03:00
LucasGGamerM
e6200e186b Merge pull request #10
feat(theme/nord): add favourite and bookmark icon
2022-12-24 11:25:03 -03:00
FineFindus
5564502125 feat(theme/nord): add favourite and bookmark icon 2022-12-24 13:40:06 +01:00
LucasGGamerM
7947e7689c Bump version number 2022-12-23 12:39:37 -03:00
LucasGGamerM
b53ada7ea2 Fixing color preference not saved loaded on android 11 and below devices 2022-12-23 12:39:14 -03:00
LucasGGamerM
584f28534a Merge branch 'development_of_the_nord_theme' 2022-12-23 12:03:31 -03:00
LucasGGamerM
770fde7aac Fixing the background of the disabled button on light themes and dark themes 2022-12-23 12:03:17 -03:00
LucasGGamerM
3d7f918132 Merge branch 'development_of_the_nord_theme' 2022-12-23 11:58:49 -03:00
LucasGGamerM
29b8cedc7c Merge remote-tracking branch 'origin/development_of_the_nord_theme' into development_of_the_nord_theme
# Conflicts:
#	mastodon/src/main/res/values/colors.xml
2022-12-23 11:55:22 -03:00
LucasGGamerM
33b65c3bf3 Merge pull request #9 from FineFindus/development_of_the_nord_theme
feat(theme/nord): change popup color
2022-12-23 11:54:49 -03:00
LucasGGamerM
34ab1bcd9c Change the accent color back to default 2022-12-23 11:54:47 -03:00
LucasGGamerM
cfdc88174b Bumping version number 2022-12-23 11:47:51 -03:00
LucasGGamerM
15123d8924 Merge branch 'development_of_the_nord_theme' 2022-12-23 11:46:38 -03:00
LucasGGamerM
20086d76ce Fixing the accent color for the nord theme 2022-12-23 11:46:11 -03:00
FineFindus
1ca4fb5c37 feat(theme/nord): change popup color 2022-12-23 15:41:28 +01:00
LucasGGamerM
009016a835 Adding a toggle for custom notification icons 2022-12-23 11:33:08 -03:00
LucasGGamerM
33dfb2a30d Merge branch 'development_of_the_nord_theme' 2022-12-23 11:04:32 -03:00
LucasGGamerM
1604c067fd Fixing up the nord theme 2022-12-23 10:59:12 -03:00
LucasGGamerM
0c7419e2b3 Its less broken, but I still found some bugs 2022-12-23 10:37:14 -03:00
LucasGGamerM
7cf30ccb98 Maybe fixing the nord theme. Still a lot of work that needs to be done 2022-12-23 08:29:01 -03:00
LucasGGamerM
aa2c8c5624 Bump the version number 2022-12-22 20:21:27 -03:00
LucasGGamerM
875695c239 Fixing up the nord theme 2022-12-22 20:17:05 -03:00
LucasGGamerM
61049a1302 Adding the nord theme 2022-12-22 19:27:02 -03:00
LucasGGamerM
28db90aa82 Its going there 2022-12-22 18:59:28 -03:00
LucasGGamerM
f0e7fc5e3b Its almost working 2022-12-22 18:58:20 -03:00
LucasGGamerM
2169afa8e7 Merge remote-tracking branch 'origin/master' 2022-12-22 15:49:09 -03:00
LucasGGamerM
508ec06d93 Bump version number 2022-12-22 15:48:38 -03:00
LucasGGamerM
9fb39d9403 Making it compile again 2022-12-22 15:46:09 -03:00
sk
4879d74f80 implement followed hashtags list
closes sk22/megalodon#162
2022-12-22 15:36:02 -03:00
LucasGGamerM
ba3f6c4f95 Changing stuff back to moshidon again 2022-12-22 15:32:32 -03:00
LucasGGamerM
481241c4f6 Using fluent icon instead of normal icon for the color picker 2022-12-22 14:58:16 -03:00
LucasGGamerM
5798587dc6 merge branch 'feature/more_html_tags' 2022-12-22 14:50:15 -03:00
sk
066e3e08a2 disable boost button if disabled
closes #180
2022-12-22 14:49:21 -03:00
sk
16d6c14633 try to open link previews in app 2022-12-22 14:49:16 -03:00
sk
80a4a3551c match navigation bar color with toolbar 2022-12-22 14:47:57 -03:00
LucasGGamerM
74f3bb8708 Adding notification icons for different stuff, and fixing the color of the compose_shortcut thing 2022-12-22 14:46:06 -03:00
sk
c3e398b3c2 use color attributes instead of fixed colors 2022-12-22 14:33:46 -03:00
sk
dcfa812c83 fix media upload colors 2022-12-22 14:30:41 -03:00
sk
065e65d708 reset state on boost long click 2022-12-22 14:30:37 -03:00
sk
bca0dab381 add long-click to "quote" 2022-12-22 14:29:34 -03:00
sk
4a45c1055e only perform fedi lookup if looks like fedi url 2022-12-22 14:19:04 -03:00
sk
7c789746ce resolve fediverse links in app
closes sk22#177
closes sk22#96
2022-12-22 14:19:03 -03:00
sk
f46ce5576c reuse old brownish gray and move colors 2022-12-22 14:15:36 -03:00
sk
730e6fc1fa fix wrong default visibility in popup
closes sk22#174
2022-12-22 14:15:18 -03:00
sk
cb36cc042c move button text/background to styles 2022-12-22 14:15:05 -03:00
sk
5d586418f9 add toolbar background color 2022-12-22 14:15:05 -03:00
sk22
44f1d026d6 Translated using Weblate (German)
Currently translated at 100.0% (70 of 70 strings)

Translation: Megalodon/values
Translate-URL: https://translate.codeberg.org/projects/megalodon/values/de/
2022-12-22 14:14:41 -03:00
jonta
defaa1095c Translated using Weblate (Portuguese (Brazil))
Currently translated at 100.0% (62 of 62 strings)

Translation: Megalodon/values
Translate-URL: https://translate.codeberg.org/projects/megalodon/values/pt_BR/
2022-12-22 14:14:34 -03:00
gallegonovato
c67f2f8027 Translated using Weblate (Spanish)
Currently translated at 100.0% (62 of 62 strings)

Translation: Megalodon/values
Translate-URL: https://translate.codeberg.org/projects/megalodon/values/es/
2022-12-22 14:14:28 -03:00
Radiquum
452128565f Translated using Weblate (Russian)
Currently translated at 100.0% (62 of 62 strings)

Translation: Megalodon/values
Translate-URL: https://translate.codeberg.org/projects/megalodon/values/ru/
2022-12-22 14:14:23 -03:00
Linerly
6322d3c984 Translated using Weblate (Indonesian)
Currently translated at 100.0% (62 of 62 strings)

Translation: Megalodon/values
Translate-URL: https://translate.codeberg.org/projects/megalodon/values/id/
2022-12-22 14:14:18 -03:00
Choukajohn
d68c820e58 Translated using Weblate (French)
Currently translated at 100.0% (62 of 62 strings)

Translation: Megalodon/values
Translate-URL: https://translate.codeberg.org/projects/megalodon/values/fr/
2022-12-22 14:14:13 -03:00
AiOO
79f37b4813 Translated using Weblate (Korean)
Currently translated at 100.0% (62 of 62 strings)

Translation: Megalodon/values
Translate-URL: https://translate.codeberg.org/projects/megalodon/values/ko/
2022-12-22 14:14:07 -03:00
LucasGGamerM
87460a2fb6 Making it work again just in case idk 2022-12-22 11:52:43 -03:00
LucasGGamerM
6774a642d9 Setting purple as default and making it work idk 2022-12-22 11:49:07 -03:00
LucasGGamerM
f0bd9233b7 IT FINALLY FUCKING COMPILES 2022-12-22 11:27:52 -03:00
LucasGGamerM
66efe750a8 Trying to make it compile properly idek wtf to do anymore 2022-12-22 11:24:36 -03:00
sk
3658fc423b simplify themes 2022-12-22 11:08:26 -03:00
sk
3c3ad7447e only load default visibility if not editing
fix mastodon#306
2022-12-22 09:07:41 -03:00
LucasGGamerM
b570064b99 Fixing missing error toast message 2022-12-22 09:03:14 -03:00
LucasGGamerM
d9f6ef69fe Revert "Whatever the fuck this is. Hopefully it compiles on the first try"
This reverts commit bdac1d5bb4.
2022-12-22 09:01:30 -03:00
sk
bdac1d5bb4 Whatever the fuck this is. Hopefully it compiles on the first try 2022-12-22 09:00:51 -03:00
sk
1eee1ead5e merge miui fix for copying text 2022-12-22 08:58:08 -03:00
sk
0ec51f5b34 set pivot point once 2022-12-22 08:57:13 -03:00
sk
6c6fb05a7a fix broken long click 2022-12-22 08:57:08 -03:00
sk
09a0faacba fix bug in bookmark button
closes #167
2022-12-22 08:51:32 -03:00
sk
d0d1d15de5 add option to disable swiping
closes sk22#165
2022-12-22 08:50:25 -03:00
sk
e4e9516d5d copy post URL on long click 2022-12-22 08:48:05 -03:00
sk
05eceecbea move copy text to UiUtils 2022-12-22 08:48:01 -03:00
sk
71ba1bb0d5 restore toast message for android 13+ 2022-12-22 08:47:56 -03:00
sk
2160a26648 add vibration when copying username 2022-12-22 08:47:52 -03:00
sk
5433eac9c9 fix updating wrong status when interacting with reblog
see mastodon#467
2022-12-22 08:45:55 -03:00
LucasGGamerM
0a68f86200 Update default.html 2022-12-21 19:50:47 -03:00
LucasGGamerM
c91dae0346 Update README.md 2022-12-21 18:04:21 -03:00
LucasGGamerM
e1df7e5077 Update README.md 2022-12-21 18:03:52 -03:00
LucasGGamerM
0560b54559 Bump version number 2022-12-21 17:19:55 -03:00
LucasGGamerM
c78db7e835 Fixing the visibility of the translate button... again. This time I scrolled a lot, so i know its not broken 2022-12-21 17:19:28 -03:00
LucasGGamerM
c837a2d4b6 Bumping version number 2022-12-21 09:28:19 -03:00
LucasGGamerM
70b91b7a9a Fixing npe on timeline 2022-12-21 09:27:16 -03:00
LucasGGamerM
27079a7ec5 Version 69 is special, lmao 2022-12-20 19:56:49 -03:00
LucasGGamerM
9563df0574 Making it appear in every post that isnt on the default language and that allows translation. Merge this as well @sk22, as its a rather useful thing 2022-12-20 19:22:42 -03:00
LucasGGamerM
638209cc13 Renaming string to fix the translate_post error message 2022-12-20 18:51:59 -03:00
LucasGGamerM
224c731afa Merge remote-tracking branch 'origin/develop' into develop 2022-12-20 17:43:38 -03:00
LucasGGamerM
0bbf937531 Please merge this @sk22, its a transparency filter for when the translation is loading 2022-12-20 17:42:47 -03:00
LucasGGamerM
3556c92c3e Please merge this @sk22 2022-12-20 17:35:40 -03:00
LucasGGamerM
87c5b23196 Re-re-cleaning unused things. 2022-12-20 17:13:17 -03:00
LucasGGamerM
c83910c885 Cleaning up the old implementation 2022-12-20 17:09:34 -03:00
LucasGGamerM
586622e90d Its barely working. Huge thanks to @sk22 btw 2022-12-20 16:52:48 -03:00
sk
e5e2430e03 check if server supports translation earlier
closes #172
2022-12-20 16:28:22 -03:00
sk
04bfdba50e Adding translate button from megalodon 2022-12-20 16:28:19 -03:00
sk
7abf15e9e0 use primary color for update notification
closes #169
2022-12-20 16:16:52 -03:00
Grishka
6b680831b8 Fix #472 2022-12-20 16:12:54 -03:00
sk
6cbf100828 fire counter updated event for content status
see mastodon#467
closes sk22#173
2022-12-20 14:12:46 -03:00
sk
3e7bbebe7f fix counter updates for preloaded data
re: mastodon#467
see fb5289372d
2022-12-20 14:12:46 -03:00
sk
56d344045a add drag to open to visibility button 2022-12-20 14:12:45 -03:00
LucasGGamerM
7ab634cc08 Renaming megalodon to moshidon 2022-12-20 14:12:01 -03:00
sk
9f0db3ebb5 update strings 2022-12-20 13:58:41 -03:00
sk22
6415eb8590 Translated using Weblate (German)
Currently translated at 100.0% (70 of 70 strings)

Translation: Megalodon/values
Translate-URL: https://translate.codeberg.org/projects/megalodon/values/de/
2022-12-20 13:58:30 -03:00
AiOO
87c77b84a4 Translated using Weblate (Korean)
Currently translated at 100.0% (8 of 8 strings)

Translation: Megalodon/metadata
Translate-URL: https://translate.codeberg.org/projects/megalodon/metadata/ko/
2022-12-20 13:57:37 -03:00
jonta
0b7bb16f22 Translated using Weblate (Portuguese (Brazil))
Currently translated at 100.0% (8 of 8 strings)

Translation: Megalodon/metadata
Translate-URL: https://translate.codeberg.org/projects/megalodon/metadata/pt_BR/
2022-12-20 13:57:37 -03:00
jonta
5164b5ba78 Translated using Weblate (Portuguese (Brazil))
Currently translated at 100.0% (62 of 62 strings)

Translation: Megalodon/values
Translate-URL: https://translate.codeberg.org/projects/megalodon/values/pt_BR/
2022-12-20 13:57:37 -03:00
gallegonovato
f3c28bc66a Translated using Weblate (Spanish)
Currently translated at 100.0% (62 of 62 strings)

Translation: Megalodon/values
Translate-URL: https://translate.codeberg.org/projects/megalodon/values/es/
2022-12-20 13:57:36 -03:00
itslameni
239f7eb9e7 Translated using Weblate (Russian)
Currently translated at 37.5% (3 of 8 strings)

Translation: Megalodon/metadata
Translate-URL: https://translate.codeberg.org/projects/megalodon/metadata/ru/
2022-12-20 13:57:21 -03:00
Linerly
d6daf7a553 Translated using Weblate (Indonesian)
Currently translated at 100.0% (8 of 8 strings)

Translation: Megalodon/metadata
Translate-URL: https://translate.codeberg.org/projects/megalodon/metadata/id/
2022-12-20 13:57:21 -03:00
Radiquum
dfb3b230e6 Translated using Weblate (Russian)
Currently translated at 100.0% (62 of 62 strings)

Translation: Megalodon/values
Translate-URL: https://translate.codeberg.org/projects/megalodon/values/ru/
2022-12-20 13:57:21 -03:00
Linerly
484a5c878f Translated using Weblate (Indonesian)
Currently translated at 100.0% (62 of 62 strings)

Translation: Megalodon/values
Translate-URL: https://translate.codeberg.org/projects/megalodon/values/id/
2022-12-20 13:57:20 -03:00
Choukajohn
3f27cfb13b Translated using Weblate (French)
Currently translated at 100.0% (62 of 62 strings)

Translation: Megalodon/values
Translate-URL: https://translate.codeberg.org/projects/megalodon/values/fr/
2022-12-20 13:57:15 -03:00
AiOO
38e2ba6ccd Translated using Weblate (Korean)
Currently translated at 100.0% (62 of 62 strings)

Translation: Megalodon/values
Translate-URL: https://translate.codeberg.org/projects/megalodon/values/ko/
2022-12-20 13:57:03 -03:00
sk
3dad38e614 update strings 2022-12-20 13:57:02 -03:00
sk
0865c9d1bd update german 2022-12-20 13:57:02 -03:00
LucasGGamerM
20a8783d84 Making the icons good again in the profile page 2022-12-20 13:45:10 -03:00
LucasGGamerM
0b96fb05fc Bumping version number 2022-12-18 20:57:47 -03:00
LucasGGamerM
8767d62de7 Fixing a fucking NPE 2022-12-18 20:54:42 -03:00
LucasGGamerM
74fb04e2d4 Disabling the Translate button on statuses that are from the same default language, or that are private or direct messages. 2022-12-18 20:04:32 -03:00
LucasGGamerM
2537460e16 Tis broken 2022-12-18 19:43:48 -03:00
LucasGGamerM
be3dfde3be Changing out (again) the link back to moshidons github 2022-12-18 17:58:21 -03:00
LucasGGamerM
42025035ad Caching the status translation for easier use 2022-12-18 17:57:09 -03:00
LucasGGamerM
6a667fdf32 Bump version number 2022-12-18 14:11:18 -03:00
LucasGGamerM
bfafac3d4f Fixing the translate icon tint, changing translate icon to fluent icon. Making it better overall 2022-12-18 14:09:21 -03:00
LucasGGamerM
0cafbe9f91 Logic side done for the red theme. 2022-12-18 12:54:17 -03:00
LucasGGamerM
2fbf172729 Styles and colors.xml side done. Putting a string in there as well :D 2022-12-18 12:41:40 -03:00
sk
bb9755f4af Making the boost icon better 2022-12-18 11:12:55 -03:00
LucasGGamerM
2a01377a8a Why tf did this revert to the old thing? 2022-12-18 11:04:47 -03:00
LucasGGamerM
61cc6d5d07 Checking out of the account list fragment thing 2022-12-18 11:04:32 -03:00
LucasGGamerM
1d74a37f60 Dunno why, just want to commit this 2022-12-18 11:04:05 -03:00
LucasGGamerM
ef9645f9e7 Ranaming stuffs back to moshidon 2022-12-18 11:02:51 -03:00
sk
6a103ca3f3 fix text view cutting off text
closes #157
2022-12-18 10:52:01 -03:00
LucasGGamerM
c22772121b Ranaming stuffs back to moshidon 2022-12-17 21:23:52 -03:00
kaea
de7bc69d2a Translated using Weblate (Polish)
Currently translated at 100.0% (59 of 59 strings)

Translation: Megalodon/values
Translate-URL: https://translate.codeberg.org/projects/megalodon/values/pl/
2022-12-17 21:21:55 -03:00
itslameni
2eccd572c9 Translated using Weblate (Russian)
Currently translated at 37.5% (3 of 8 strings)

Translation: Megalodon/metadata
Translate-URL: https://translate.codeberg.org/projects/megalodon/metadata/ru/
2022-12-17 21:21:55 -03:00
itslameni
824a62024b A whole lot of stuffs, including merging stuffs from weblate 2022-12-17 21:21:54 -03:00
tippete
3a3cfda919 Translated using Weblate (Italian)
Currently translated at 100.0% (59 of 59 strings)

Translation: Megalodon/values
Translate-URL: https://translate.codeberg.org/projects/megalodon/values/it/
2022-12-17 21:21:05 -03:00
AiOO
e29120cc51 Translated using Weblate (Korean)
Currently translated at 100.0% (8 of 8 strings)

Translation: Megalodon/metadata
Translate-URL: https://translate.codeberg.org/projects/megalodon/metadata/ko/
2022-12-17 21:21:03 -03:00
nitrogenez
197d5c6bc3 Translated using Weblate (Ukrainian)
Currently translated at 100.0% (59 of 59 strings)

Translation: Megalodon/values
Translate-URL: https://translate.codeberg.org/projects/megalodon/values/uk/
2022-12-17 21:21:00 -03:00
jonta
d143cc75db Translated using Weblate (Portuguese (Brazil))
Currently translated at 93.2% (55 of 59 strings)

Translation: Megalodon/values
Translate-URL: https://translate.codeberg.org/projects/megalodon/values/pt_BR/
2022-12-17 21:21:00 -03:00
kaea
1635a06c54 Translated using Weblate (Polish)
Currently translated at 100.0% (59 of 59 strings)

Translation: Megalodon/values
Translate-URL: https://translate.codeberg.org/projects/megalodon/values/pl/
2022-12-17 21:21:00 -03:00
Choukajohn
76de0d8c70 Translated using Weblate (French)
Currently translated at 100.0% (59 of 59 strings)

Translation: Megalodon/values
Translate-URL: https://translate.codeberg.org/projects/megalodon/values/fr/
2022-12-17 21:21:00 -03:00
AiOO
402a995b8f Translated using Weblate (Korean)
Currently translated at 100.0% (59 of 59 strings)

Translation: Megalodon/values
Translate-URL: https://translate.codeberg.org/projects/megalodon/values/ko/
2022-12-17 21:21:00 -03:00
sk
f580ba7779 Refactoring names to custom. Thank you @sk22 for this amazing piece of commit 2022-12-17 21:19:40 -03:00
sk
bc3869b920 fix follow request list issues
closes #153
2022-12-17 21:09:56 -03:00
LucasGGamerM
020f4a5a1a Hiding material you in older android versions fix 2022-12-17 21:00:02 -03:00
sk
b054caa967 Hiding material you in older android versions 2022-12-17 20:52:11 -03:00
LucasGGamerM
82b7633650 Renaming stuff 2022-12-16 19:13:11 -03:00
199 changed files with 2078 additions and 1888 deletions

3
.github/FUNDING.yml vendored
View File

@@ -1,9 +1,8 @@
# These are supported funding model platforms # These are supported funding model platforms
github: # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2] github: LucasGGamerM
patreon: # mastodon patreon: # mastodon
open_collective: # Replace with a single Open Collective username e.g., user1 open_collective: # Replace with a single Open Collective username e.g., user1
ko_fi: xsk22
tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
liberapay: # Replace with a single Liberapay username e.g., user1 liberapay: # Replace with a single Liberapay username e.g., user1

View File

@@ -1,11 +1,11 @@
![Pink logo with pink shark](mastodon/src/main/res/mipmap-xhdpi/ic_launcher_round.png) ![MoshidonLogo](mastodon/src/main/res/mipmap-xhdpi/ic_launcher_round.png)
# Moshidon, the material you mastodon client! # Moshidon, the material you mastodon client!
> A fork of [megalodon](https://github.com/sk22/megalodon) which is a fork of [official Mastodon Android app](https://github.com/mastodon/mastodon-android) adding important features that are missing in the official app and possibly wont ever be implemented, such as the federated timeline, unlisted posting, bookmarks and an image description viewer. > A fork of [megalodon](https://github.com/sk22/megalodon) which is a fork of [official Mastodon Android app](https://github.com/mastodon/mastodon-android) adding important features that are missing in the official app and possibly wont ever be implemented, such as the federated timeline, unlisted posting, bookmarks and an image description viewer.
[![Download latest release](https://img.shields.io/badge/dynamic/json?color=d92aad&label=download%20apk&query=%24.tag_name&url=https%3A%2F%2Fapi.github.com%2Frepos%2Fsk22%2Fmastodon-android-fork%2Freleases%2Flatest&style=for-the-badge)](https://github.com/LucasGGamerM/moshidon/releases/latest/download/moshidon.apk) [![Download latest release](https://img.shields.io/badge/dynamic/json?color=d92aad&label=download%20apk&query=%24.tag_name&url=https%3A%2F%2Fapi.github.com%2Frepos%2FLucasGGamerM%2Fmoshidon%2Freleases%2Flatest&style=for-the-badge)](https://github.com/LucasGGamerM/moshidon/releases/latest/download/moshidon.apk)
--- ---

View File

@@ -1,2 +1,2 @@
title: Megalodon title: Moshidon
layout: default layout: default

View File

@@ -4,7 +4,7 @@
<meta charset="UTF-8"> <meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Megalodon</title> <title>Moshidon</title>
<link rel="icon" href="mastodon/src/main/res/mipmap-mdpi/ic_launcher_round.png"> <link rel="icon" href="mastodon/src/main/res/mipmap-mdpi/ic_launcher_round.png">
<link rel="me" href="https://floss.social/@mastodon"> <link rel="me" href="https://floss.social/@mastodon">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/github-markdown-css/5.1.0/github-markdown.min.css"> <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/github-markdown-css/5.1.0/github-markdown.min.css">
@@ -14,4 +14,4 @@
{{ content }} {{ content }}
</div> </div>
</body> </body>
</html> </html>

View File

@@ -9,8 +9,8 @@ android {
applicationId "org.joinmastodon.android.moshinda" applicationId "org.joinmastodon.android.moshinda"
minSdk 23 minSdk 23
targetSdk 33 targetSdk 33
versionCode 66 versionCode 81
versionName "1.1.4+fork.66.moshinda" versionName "1.1.4+fork.81.moshinda"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" 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" 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

@@ -61,6 +61,7 @@ public class GithubSelfUpdaterImpl extends GithubSelfUpdater{
info=new UpdateInfo(); info=new UpdateInfo();
info.version=prefs.getString("version", null); info.version=prefs.getString("version", null);
info.size=prefs.getLong("apkSize", 0); info.size=prefs.getLong("apkSize", 0);
info.changelog=prefs.getString("changelog", null);
downloadID=prefs.getLong("downloadID", 0); downloadID=prefs.getLong("downloadID", 0);
if(downloadID==0 || !getUpdateApkFile().exists()){ if(downloadID==0 || !getUpdateApkFile().exists()){
state=UpdateState.UPDATE_AVAILABLE; state=UpdateState.UPDATE_AVAILABLE;
@@ -84,6 +85,7 @@ public class GithubSelfUpdaterImpl extends GithubSelfUpdater{
.remove("apkURL") .remove("apkURL")
.remove("checkedByBuild") .remove("checkedByBuild")
.remove("downloadID") .remove("downloadID")
.remove("changelog")
.apply(); .apply();
} }
} }
@@ -116,6 +118,7 @@ public class GithubSelfUpdaterImpl extends GithubSelfUpdater{
Call call=MastodonAPIController.getHttpClient().newCall(req); Call call=MastodonAPIController.getHttpClient().newCall(req);
try(Response resp=call.execute()){ try(Response resp=call.execute()){
JsonObject obj=JsonParser.parseReader(resp.body().charStream()).getAsJsonObject(); JsonObject obj=JsonParser.parseReader(resp.body().charStream()).getAsJsonObject();
String changelog=obj.get("body").getAsString();
String tag=obj.get("tag_name").getAsString(); String tag=obj.get("tag_name").getAsString();
Pattern pattern=Pattern.compile("v?(\\d+)\\.(\\d+)\\.(\\d+)\\+fork\\.(\\d+)"); Pattern pattern=Pattern.compile("v?(\\d+)\\.(\\d+)\\.(\\d+)\\+fork\\.(\\d+)");
Matcher matcher=pattern.matcher(tag); Matcher matcher=pattern.matcher(tag);
@@ -151,6 +154,7 @@ public class GithubSelfUpdaterImpl extends GithubSelfUpdater{
UpdateInfo info=new UpdateInfo(); UpdateInfo info=new UpdateInfo();
info.size=size; info.size=size;
info.version=version; info.version=version;
info.changelog=changelog;
this.info=info; this.info=info;
getPrefs().edit() getPrefs().edit()
@@ -158,6 +162,7 @@ public class GithubSelfUpdaterImpl extends GithubSelfUpdater{
.putString("version", version) .putString("version", version)
.putString("apkURL", url) .putString("apkURL", url)
.putInt("checkedByBuild", BuildConfig.VERSION_CODE) .putInt("checkedByBuild", BuildConfig.VERSION_CODE)
.putString("changelog", changelog)
.remove("downloadID") .remove("downloadID")
.apply(); .apply();

View File

@@ -4,7 +4,8 @@
<uses-permission android:name="android.permission.INTERNET"/> <uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.FOREGROUND_SERVICE"/> <uses-permission android:name="android.permission.FOREGROUND_SERVICE"/>
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" android:maxSdkVersion="28"/> <uses-permission android:name="android.permission.VIBRATE" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" android:maxSdkVersion="28"/>
<uses-permission android:name="${applicationId}.permission.C2D_MESSAGE"/> <uses-permission android:name="${applicationId}.permission.C2D_MESSAGE"/>
<uses-permission android:name="com.google.android.c2dm.permission.RECEIVE"/> <uses-permission android:name="com.google.android.c2dm.permission.RECEIVE"/>
<uses-permission android:name="android.permission.POST_NOTIFICATIONS"/> <uses-permission android:name="android.permission.POST_NOTIFICATIONS"/>
@@ -19,7 +20,7 @@
android:localeConfig="@xml/locales_config" android:localeConfig="@xml/locales_config"
android:icon="@mipmap/ic_launcher" android:icon="@mipmap/ic_launcher"
android:roundIcon="@mipmap/ic_launcher_round" android:roundIcon="@mipmap/ic_launcher_round"
android:theme="@style/Theme.Mastodon.AutoLightDark.Original" android:theme="@style/Theme.Mastodon.AutoLightDark"
android:largeHeap="true"> android:largeHeap="true">
<activity android:name=".MainActivity" android:exported="true" android:configChanges="orientation|screenSize" android:windowSoftInputMode="adjustResize" android:launchMode="singleTask"> <activity android:name=".MainActivity" android:exported="true" android:configChanges="orientation|screenSize" android:windowSoftInputMode="adjustResize" android:launchMode="singleTask">

View File

@@ -52,7 +52,8 @@ public class ExternalShareActivity extends FragmentStackActivity{
Intent intent=getIntent(); Intent intent=getIntent();
StringBuilder builder=new StringBuilder(); StringBuilder builder=new StringBuilder();
if (intent.hasExtra(Intent.EXTRA_SUBJECT)) builder.append(intent.getStringExtra(Intent.EXTRA_SUBJECT)).append("\n"); String subject = "";
if (intent.hasExtra(Intent.EXTRA_SUBJECT)) builder.append(subject = intent.getStringExtra(Intent.EXTRA_SUBJECT)).append("\n\n");
if (intent.hasExtra(Intent.EXTRA_TEXT)) builder.append(intent.getStringExtra(Intent.EXTRA_TEXT)).append("\n"); if (intent.hasExtra(Intent.EXTRA_TEXT)) builder.append(intent.getStringExtra(Intent.EXTRA_TEXT)).append("\n");
String text=builder.toString(); String text=builder.toString();
List<Uri> mediaUris; List<Uri> mediaUris;
@@ -80,6 +81,8 @@ public class ExternalShareActivity extends FragmentStackActivity{
args.putString("account", accountID); args.putString("account", accountID);
if(!TextUtils.isEmpty(text)) if(!TextUtils.isEmpty(text))
args.putString("prefilledText", text); args.putString("prefilledText", text);
if(!subject.isBlank())
args.putInt("selectionEnd", subject.length());
if(mediaUris!=null && !mediaUris.isEmpty()) if(mediaUris!=null && !mediaUris.isEmpty())
args.putParcelableArrayList("mediaAttachments", toArrayList(mediaUris)); args.putParcelableArrayList("mediaAttachments", toArrayList(mediaUris));
Fragment fragment=new ComposeFragment(); Fragment fragment=new ComposeFragment();

View File

@@ -25,13 +25,16 @@ public class GlobalUserPreferences{
public static boolean showInteractionCounts; public static boolean showInteractionCounts;
public static boolean alwaysExpandContentWarnings; public static boolean alwaysExpandContentWarnings;
public static boolean disableMarquee; public static boolean disableMarquee;
public static boolean disableSwipe;
public static boolean disableDividers;
public static boolean voteButtonForSingleChoice; public static boolean voteButtonForSingleChoice;
public static boolean showDifferentiatedPushNoticationIcons;
public static boolean relocatePublishButton;
public static ThemePreference theme; public static ThemePreference theme;
public static ColorPreference color; public static ColorPreference color;
private final static Type recentLanguagesType = new TypeToken<Map<String, List<String>>>() {}.getType(); private final static Type recentLanguagesType = new TypeToken<Map<String, List<String>>>() {}.getType();
public static Map<String, List<String>> recentLanguages; public static Map<String, List<String>> recentLanguages;
public static Map<String, String> defaultLanguages;
private static SharedPreferences getPrefs(){ private static SharedPreferences getPrefs(){
return MastodonApp.context.getSharedPreferences("global", Context.MODE_PRIVATE); return MastodonApp.context.getSharedPreferences("global", Context.MODE_PRIVATE);
@@ -50,19 +53,28 @@ public class GlobalUserPreferences{
showReplies=prefs.getBoolean("showReplies", true); showReplies=prefs.getBoolean("showReplies", true);
showBoosts=prefs.getBoolean("showBoosts", true); showBoosts=prefs.getBoolean("showBoosts", true);
loadNewPosts=prefs.getBoolean("loadNewPosts", true); loadNewPosts=prefs.getBoolean("loadNewPosts", true);
showDifferentiatedPushNoticationIcons=prefs.getBoolean("showDifferentiatedPushNoticationIcons", false);
showFederatedTimeline=prefs.getBoolean("showFederatedTimeline", !BuildConfig.BUILD_TYPE.equals("playRelease")); showFederatedTimeline=prefs.getBoolean("showFederatedTimeline", !BuildConfig.BUILD_TYPE.equals("playRelease"));
showInteractionCounts=prefs.getBoolean("showInteractionCounts", false); showInteractionCounts=prefs.getBoolean("showInteractionCounts", false);
alwaysExpandContentWarnings=prefs.getBoolean("alwaysExpandContentWarnings", false); alwaysExpandContentWarnings=prefs.getBoolean("alwaysExpandContentWarnings", false);
disableMarquee=prefs.getBoolean("disableMarquee", false); disableMarquee=prefs.getBoolean("disableMarquee", false);
disableSwipe=prefs.getBoolean("disableSwipe", false);
disableDividers=prefs.getBoolean("disableDividers", true);
relocatePublishButton=prefs.getBoolean("relocatePublishButton", true);
voteButtonForSingleChoice=prefs.getBoolean("voteButtonForSingleChoice", true); voteButtonForSingleChoice=prefs.getBoolean("voteButtonForSingleChoice", true);
theme=ThemePreference.values()[prefs.getInt("theme", 0)]; theme=ThemePreference.values()[prefs.getInt("theme", 0)];
recentLanguages=fromJson(prefs.getString("recentLanguages", "{}"), recentLanguagesType, new HashMap<>()); recentLanguages=fromJson(prefs.getString("recentLanguages", "{}"), recentLanguagesType, new HashMap<>());
if(android.os.Build.VERSION.SDK_INT >= Build.VERSION_CODES.S){
color=ColorPreference.values()[prefs.getInt("color", 0)];
}else{
color=ColorPreference.values()[prefs.getInt("color", 1)];
}
try {
if(android.os.Build.VERSION.SDK_INT >= Build.VERSION_CODES.S){
color=ColorPreference.valueOf(prefs.getString("color", ColorPreference.MATERIAL3.name()));
}else{
color=ColorPreference.valueOf(prefs.getString("color", ColorPreference.PURPLE.name()));
}
} catch (IllegalArgumentException|ClassCastException ignored) {
// invalid color name or color was previously saved as integer
color=ColorPreference.PURPLE;
}
} }
public static void save(){ public static void save(){
@@ -77,20 +89,26 @@ public class GlobalUserPreferences{
.putBoolean("showInteractionCounts", showInteractionCounts) .putBoolean("showInteractionCounts", showInteractionCounts)
.putBoolean("alwaysExpandContentWarnings", alwaysExpandContentWarnings) .putBoolean("alwaysExpandContentWarnings", alwaysExpandContentWarnings)
.putBoolean("disableMarquee", disableMarquee) .putBoolean("disableMarquee", disableMarquee)
.putBoolean("disableSwipe", disableSwipe)
.putBoolean("disableDividers", disableDividers)
.putBoolean("relocatePublishButton", relocatePublishButton)
.putBoolean("showDifferentiatedPushNoticationIcons", showDifferentiatedPushNoticationIcons)
.putInt("theme", theme.ordinal()) .putInt("theme", theme.ordinal())
.putString("color", color.name())
.putString("recentLanguages", gson.toJson(recentLanguages)) .putString("recentLanguages", gson.toJson(recentLanguages))
.putInt("color", color.ordinal())
.apply(); .apply();
} }
public enum ColorPreference{ public enum ColorPreference{
MATERIAL3, MATERIAL3,
PURPLE,
PINK, PINK,
PURPLE,
GREEN, GREEN,
BLUE, BLUE,
ORANGE, BROWN,
YELLOW RED,
YELLOW,
NORD
} }
public enum ThemePreference{ public enum ThemePreference{
@@ -99,3 +117,4 @@ public class GlobalUserPreferences{
DARK DARK
} }
} }

View File

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

View File

@@ -137,13 +137,25 @@ public class PushNotificationReceiver extends BroadcastReceiver{
builder.setContentTitle(pn.title) builder.setContentTitle(pn.title)
.setContentText(pn.body) .setContentText(pn.body)
.setStyle(new Notification.BigTextStyle().bigText(pn.body)) .setStyle(new Notification.BigTextStyle().bigText(pn.body))
.setSmallIcon(R.drawable.ic_ntf_logo)
.setContentIntent(PendingIntent.getActivity(context, accountID.hashCode() & 0xFFFF, contentIntent, PendingIntent.FLAG_IMMUTABLE | PendingIntent.FLAG_UPDATE_CURRENT)) .setContentIntent(PendingIntent.getActivity(context, accountID.hashCode() & 0xFFFF, contentIntent, PendingIntent.FLAG_IMMUTABLE | PendingIntent.FLAG_UPDATE_CURRENT))
.setWhen(notification==null ? System.currentTimeMillis() : notification.createdAt.toEpochMilli()) .setWhen(notification==null ? System.currentTimeMillis() : notification.createdAt.toEpochMilli())
.setShowWhen(true) .setShowWhen(true)
.setCategory(Notification.CATEGORY_SOCIAL) .setCategory(Notification.CATEGORY_SOCIAL)
.setAutoCancel(true) .setAutoCancel(true)
.setColor(context.getColor(R.color.shortcut_icon_background)); .setColor(context.getColor(R.color.shortcut_icon_background));
if(GlobalUserPreferences.showDifferentiatedPushNoticationIcons){
switch (pn.notificationType) {
case FAVORITE -> builder.setSmallIcon(R.drawable.ic_fluent_star_24_filled);
case REBLOG -> builder.setSmallIcon(R.drawable.ic_fluent_arrow_repeat_all_24_filled);
case FOLLOW -> builder.setSmallIcon(R.drawable.ic_fluent_person_add_24_filled);
case MENTION -> builder.setSmallIcon(R.drawable.ic_fluent_mention_24_filled);
case POLL -> builder.setSmallIcon(R.drawable.ic_fluent_poll_24_filled);
default -> builder.setSmallIcon(R.drawable.ic_ntf_logo);
}
}else{
builder.setSmallIcon(R.drawable.ic_ntf_logo);
}
if(avatar!=null){ if(avatar!=null){
builder.setLargeIcon(UiUtils.getBitmapFromDrawable(avatar)); builder.setLargeIcon(UiUtils.getBitmapFromDrawable(avatar));
} }

View File

@@ -20,6 +20,7 @@ import java.util.HashMap;
import java.util.Iterator; import java.util.Iterator;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
import java.util.function.Consumer;
import androidx.annotation.CallSuper; import androidx.annotation.CallSuper;
import androidx.annotation.StringRes; import androidx.annotation.StringRes;
@@ -101,9 +102,14 @@ public abstract class MastodonAPIRequest<T> extends APIRequest<T>{
} }
public MastodonAPIRequest<T> wrapProgress(Activity activity, @StringRes int message, boolean cancelable){ public MastodonAPIRequest<T> wrapProgress(Activity activity, @StringRes int message, boolean cancelable){
return wrapProgress(activity, message, cancelable, null);
}
public MastodonAPIRequest<T> wrapProgress(Activity activity, @StringRes int message, boolean cancelable, Consumer<ProgressDialog> transform){
progressDialog=new ProgressDialog(activity); progressDialog=new ProgressDialog(activity);
progressDialog.setMessage(activity.getString(message)); progressDialog.setMessage(activity.getString(message));
progressDialog.setCancelable(cancelable); progressDialog.setCancelable(cancelable);
if (transform != null) transform.accept(progressDialog);
if(cancelable){ if(cancelable){
progressDialog.setOnCancelListener(dialog->cancel()); progressDialog.setOnCancelListener(dialog->cancel());
} }

View File

@@ -11,6 +11,7 @@ import org.joinmastodon.android.events.StatusCountersUpdatedEvent;
import org.joinmastodon.android.model.Status; import org.joinmastodon.android.model.Status;
import java.util.HashMap; import java.util.HashMap;
import java.util.function.Consumer;
import me.grishka.appkit.api.Callback; import me.grishka.appkit.api.Callback;
import me.grishka.appkit.api.ErrorResponse; import me.grishka.appkit.api.ErrorResponse;
@@ -25,7 +26,7 @@ public class StatusInteractionController{
this.accountID=accountID; this.accountID=accountID;
} }
public void setFavorited(Status status, boolean favorited){ public void setFavorited(Status status, boolean favorited, Consumer<Status> cb){
if(!Looper.getMainLooper().isCurrentThread()) if(!Looper.getMainLooper().isCurrentThread())
throw new IllegalStateException("Can only be called from main thread"); throw new IllegalStateException("Can only be called from main thread");
@@ -38,6 +39,8 @@ public class StatusInteractionController{
@Override @Override
public void onSuccess(Status result){ public void onSuccess(Status result){
runningFavoriteRequests.remove(status.id); runningFavoriteRequests.remove(status.id);
result.favouritesCount = Math.max(0, status.favouritesCount) + (favorited ? 1 : -1);
cb.accept(result);
E.post(new StatusCountersUpdatedEvent(result)); E.post(new StatusCountersUpdatedEvent(result));
} }
@@ -46,24 +49,17 @@ public class StatusInteractionController{
runningFavoriteRequests.remove(status.id); runningFavoriteRequests.remove(status.id);
error.showToast(MastodonApp.context); error.showToast(MastodonApp.context);
status.favourited=!favorited; status.favourited=!favorited;
if(favorited) cb.accept(status);
status.favouritesCount--;
else
status.favouritesCount++;
E.post(new StatusCountersUpdatedEvent(status)); E.post(new StatusCountersUpdatedEvent(status));
} }
}) })
.exec(accountID); .exec(accountID);
runningFavoriteRequests.put(status.id, req); runningFavoriteRequests.put(status.id, req);
status.favourited=favorited; status.favourited=favorited;
if(favorited)
status.favouritesCount++;
else
status.favouritesCount--;
E.post(new StatusCountersUpdatedEvent(status)); E.post(new StatusCountersUpdatedEvent(status));
} }
public void setReblogged(Status status, boolean reblogged){ public void setReblogged(Status status, boolean reblogged, Consumer<Status> cb){
if(!Looper.getMainLooper().isCurrentThread()) if(!Looper.getMainLooper().isCurrentThread())
throw new IllegalStateException("Can only be called from main thread"); throw new IllegalStateException("Can only be called from main thread");
@@ -74,8 +70,11 @@ public class StatusInteractionController{
SetStatusReblogged req=(SetStatusReblogged) new SetStatusReblogged(status.id, reblogged) SetStatusReblogged req=(SetStatusReblogged) new SetStatusReblogged(status.id, reblogged)
.setCallback(new Callback<>(){ .setCallback(new Callback<>(){
@Override @Override
public void onSuccess(Status result){ public void onSuccess(Status reblog){
Status result = reblog.getContentStatus();
runningReblogRequests.remove(status.id); runningReblogRequests.remove(status.id);
result.reblogsCount = Math.max(0, status.reblogsCount) + (reblogged ? 1 : -1);
cb.accept(result);
E.post(new StatusCountersUpdatedEvent(result)); E.post(new StatusCountersUpdatedEvent(result));
} }
@@ -84,24 +83,21 @@ public class StatusInteractionController{
runningReblogRequests.remove(status.id); runningReblogRequests.remove(status.id);
error.showToast(MastodonApp.context); error.showToast(MastodonApp.context);
status.reblogged=!reblogged; status.reblogged=!reblogged;
if(reblogged) cb.accept(status);
status.reblogsCount--;
else
status.reblogsCount++;
E.post(new StatusCountersUpdatedEvent(status)); E.post(new StatusCountersUpdatedEvent(status));
} }
}) })
.exec(accountID); .exec(accountID);
runningReblogRequests.put(status.id, req); runningReblogRequests.put(status.id, req);
status.reblogged=reblogged; status.reblogged=reblogged;
if(reblogged)
status.reblogsCount++;
else
status.reblogsCount--;
E.post(new StatusCountersUpdatedEvent(status)); E.post(new StatusCountersUpdatedEvent(status));
} }
public void setBookmarked(Status status, boolean bookmarked){ public void setBookmarked(Status status, boolean bookmarked){
setBookmarked(status, bookmarked, r->{});
}
public void setBookmarked(Status status, boolean bookmarked, Consumer<Status> cb){
if(!Looper.getMainLooper().isCurrentThread()) if(!Looper.getMainLooper().isCurrentThread())
throw new IllegalStateException("Can only be called from main thread"); throw new IllegalStateException("Can only be called from main thread");
@@ -114,6 +110,7 @@ public class StatusInteractionController{
@Override @Override
public void onSuccess(Status result){ public void onSuccess(Status result){
runningBookmarkRequests.remove(status.id); runningBookmarkRequests.remove(status.id);
cb.accept(result);
E.post(new StatusCountersUpdatedEvent(result)); E.post(new StatusCountersUpdatedEvent(result));
} }
@@ -122,6 +119,7 @@ public class StatusInteractionController{
runningBookmarkRequests.remove(status.id); runningBookmarkRequests.remove(status.id);
error.showToast(MastodonApp.context); error.showToast(MastodonApp.context);
status.bookmarked=!bookmarked; status.bookmarked=!bookmarked;
cb.accept(status);
E.post(new StatusCountersUpdatedEvent(status)); E.post(new StatusCountersUpdatedEvent(status));
} }
}) })

View File

@@ -1,20 +0,0 @@
package org.joinmastodon.android.api.requests.statuses;
import org.joinmastodon.android.api.AllFieldsAreRequired;
import org.joinmastodon.android.api.MastodonAPIRequest;
import org.joinmastodon.android.model.BaseModel;
import org.joinmastodon.android.model.Status;
import org.joinmastodon.android.model.StatusTranslation;
import java.util.Locale;
public class GetStatusTranslation extends MastodonAPIRequest<StatusTranslation>{
public GetStatusTranslation(String id){
super(HttpMethod.POST, "/statuses/"+id+"/translate", StatusTranslation.class);
Request r = new Request();
setRequestBody(r);
}
public static class Request{
}
}

View File

@@ -0,0 +1,11 @@
package org.joinmastodon.android.api.requests.statuses;
import org.joinmastodon.android.api.MastodonAPIRequest;
import org.joinmastodon.android.model.TranslatedStatus;
public class TranslateStatus extends MastodonAPIRequest<TranslatedStatus> {
public TranslateStatus(String id) {
super(HttpMethod.POST, "/statuses/"+id+"/translate", TranslatedStatus.class);
setRequestBody(new Object());
}
}

View File

@@ -0,0 +1,24 @@
package org.joinmastodon.android.api.requests.tags;
import com.google.gson.reflect.TypeToken;
import org.joinmastodon.android.api.MastodonAPIRequest;
import org.joinmastodon.android.api.requests.HeaderPaginationRequest;
import org.joinmastodon.android.model.Hashtag;
import java.util.List;
public class GetFollowedHashtags extends HeaderPaginationRequest<Hashtag> {
public GetFollowedHashtags(String maxID, String minID, int limit, String sinceID){
super(HttpMethod.GET, "/followed_tags", new TypeToken<>(){});
if(maxID!=null)
addQueryParameter("max_id", maxID);
if(minID!=null)
addQueryParameter("min_id", minID);
if(sinceID!=null)
addQueryParameter("since_id", sinceID);
if(limit>0)
addQueryParameter("limit", ""+limit);
}
}

View File

@@ -104,6 +104,7 @@ public class AccountSessionManager{
public void addAccount(Instance instance, Token token, Account self, Application app, AccountActivationInfo activationInfo){ public void addAccount(Instance instance, Token token, Account self, Application app, AccountActivationInfo activationInfo){
instances.put(instance.uri, instance); instances.put(instance.uri, instance);
updateInstanceInfoV2(instance);
AccountSession session=new AccountSession(token, self, app, instance.uri, activationInfo==null, activationInfo); AccountSession session=new AccountSession(token, self, app, instance.uri, activationInfo==null, activationInfo);
sessions.put(session.getID(), session); sessions.put(session.getID(), session);
lastActiveAccountID=session.getID(); lastActiveAccountID=session.getID();
@@ -329,9 +330,7 @@ public class AccountSessionManager{
instances.put(domain, instance); instances.put(domain, instance);
updateInstanceEmojis(instance, domain); updateInstanceEmojis(instance, domain);
try { try {
if (Integer.parseInt(instance.version.split("\\.")[0]) >= 4) { updateInstanceInfoV2(instance);
updateInstanceInfoV2(domain);
}
} catch (Exception ignored) {} } catch (Exception ignored) {}
} }
@@ -343,17 +342,17 @@ public class AccountSessionManager{
.execNoAuth(domain); .execNoAuth(domain);
} }
public void updateInstanceInfoV2(String domain) { public void updateInstanceInfoV2(Instance instance) {
new GetInstance.V2().setCallback(new Callback<>() { new GetInstance.V2().setCallback(new Callback<>() {
@Override @Override
public void onSuccess(Instance.V2 v2) { public void onSuccess(Instance.V2 v2) {
Instance instanceInfo = instances.get(domain); if (instance != null) instance.v2 = v2;
if (instanceInfo != null) instanceInfo.v2 = v2; writeAccountsFile();
} }
@Override @Override
public void onError(ErrorResponse errorResponse) {} public void onError(ErrorResponse errorResponse) {}
}).execNoAuth(domain); }).execNoAuth(instance.uri);
} }
private void updateInstanceEmojis(Instance instance, String domain){ private void updateInstanceEmojis(Instance instance, String domain){

View File

@@ -462,21 +462,6 @@ public abstract class BaseStatusListFragment<T extends DisplayItemsParent> exten
Status status=holder.getItem().status; Status status=holder.getItem().status;
revealSpoiler(status, holder.getItemID()); revealSpoiler(status, holder.getItemID());
} }
public void onRevealTranslationClick(HeaderStatusDisplayItem.Holder holder){
Status status=holder.getItem().status;
revealTranslation(status, holder.getItemID());
}
protected void revealTranslation(Status status, String itemID){
status.wantsTranslation=!status.wantsTranslation;
TextStatusDisplayItem.Holder text=findHolderOfType(itemID, TextStatusDisplayItem.Holder.class);
if(text!=null)
adapter.notifyItemChanged(text.getAbsoluteAdapterPosition()-getMainAdapterOffset());
HeaderStatusDisplayItem.Holder header=findHolderOfType(itemID, HeaderStatusDisplayItem.Holder.class);
if(header!=null)
header.rebind();
updateImagesSpoilerState(status, itemID);
}
protected void revealSpoiler(Status status, String itemID){ protected void revealSpoiler(Status status, String itemID){
status.spoilerRevealed=true; status.spoilerRevealed=true;
@@ -690,7 +675,7 @@ public abstract class BaseStatusListFragment<T extends DisplayItemsParent> exten
private int currentMediaHiddenLayoutsWidth=0; private int currentMediaHiddenLayoutsWidth=0;
{ {
dividerPaint.setColor(UiUtils.getThemeColor(getActivity(), R.attr.colorPollVoted)); dividerPaint.setColor(UiUtils.getThemeColor(getActivity(), GlobalUserPreferences.disableDividers ? R.attr.colorWindowBackground : R.attr.colorPollVoted));
dividerPaint.setStyle(Paint.Style.STROKE); dividerPaint.setStyle(Paint.Style.STROKE);
dividerPaint.setStrokeWidth(V.dp(1)); dividerPaint.setStrokeWidth(V.dp(1));
} }
@@ -802,7 +787,7 @@ public abstract class BaseStatusListFragment<T extends DisplayItemsParent> exten
currentMediaHiddenLayoutsWidth=width; currentMediaHiddenLayoutsWidth=width;
String title=getString(R.string.sensitive_content); String title=getString(R.string.sensitive_content);
TextPaint titlePaint=new TextPaint(Paint.ANTI_ALIAS_FLAG); TextPaint titlePaint=new TextPaint(Paint.ANTI_ALIAS_FLAG);
titlePaint.setColor(getResources().getColor(R.color.gray_50)); titlePaint.setColor(UiUtils.getThemeColor(getContext(), R.attr.colorGray50));
titlePaint.setTextSize(V.dp(22)); titlePaint.setTextSize(V.dp(22));
titlePaint.setTypeface(mediumTypeface); titlePaint.setTypeface(mediumTypeface);
mediaHiddenTitleLayout=StaticLayout.Builder.obtain(title, 0, title.length(), titlePaint, width) mediaHiddenTitleLayout=StaticLayout.Builder.obtain(title, 0, title.length(), titlePaint, width)
@@ -813,7 +798,7 @@ public abstract class BaseStatusListFragment<T extends DisplayItemsParent> exten
.setAlignment(Layout.Alignment.ALIGN_CENTER) .setAlignment(Layout.Alignment.ALIGN_CENTER)
.build(); .build();
TextPaint textPaint=new TextPaint(Paint.ANTI_ALIAS_FLAG); TextPaint textPaint=new TextPaint(Paint.ANTI_ALIAS_FLAG);
textPaint.setColor(getResources().getColor(R.color.gray_200)); textPaint.setColor(UiUtils.getThemeColor(getContext(), R.attr.colorGray200));
textPaint.setTextSize(V.dp(16)); textPaint.setTextSize(V.dp(16));
String text=getString(R.string.sensitive_content_explain); String text=getString(R.string.sensitive_content_explain);
mediaHiddenTextLayout=StaticLayout.Builder.obtain(text, 0, text.length(), textPaint, width) mediaHiddenTextLayout=StaticLayout.Builder.obtain(text, 0, text.length(), textPaint, width)

View File

@@ -155,7 +155,7 @@ public class ComposeFragment extends MastodonToolbarFragment implements OnBackPr
private int charCount, charLimit, trimmedCharCount; private int charCount, charLimit, trimmedCharCount;
private Button publishButton, languageButton; private Button publishButton, languageButton;
private PopupMenu languagePopup; private PopupMenu languagePopup, visibilityPopup;
private ImageButton mediaBtn, pollBtn, emojiBtn, spoilerBtn, visibilityBtn; private ImageButton mediaBtn, pollBtn, emojiBtn, spoilerBtn, visibilityBtn;
private ImageView sensitiveIcon; private ImageView sensitiveIcon;
private ComposeMediaLayout attachmentsView; private ComposeMediaLayout attachmentsView;
@@ -203,10 +203,14 @@ public class ComposeFragment extends MastodonToolbarFragment implements OnBackPr
private String language; private String language;
private MastodonLanguage.LanguageResolver languageResolver; private MastodonLanguage.LanguageResolver languageResolver;
private int navigationBarColorBefore;
@Override @Override
public void onCreate(Bundle savedInstanceState){ public void onCreate(Bundle savedInstanceState){
super.onCreate(savedInstanceState); super.onCreate(savedInstanceState);
setRetainInstance(true); setRetainInstance(true);
navigationBarColorBefore = getActivity().getWindow().getNavigationBarColor();
getActivity().getWindow().setNavigationBarColor(UiUtils.getThemeColor(getActivity(), R.attr.colorBackgroundLightest));
accountID=getArguments().getString("account"); accountID=getArguments().getString("account");
AccountSession session=AccountSessionManager.getInstance().getAccount(accountID); AccountSession session=AccountSessionManager.getInstance().getAccount(accountID);
@@ -233,6 +237,8 @@ public class ComposeFragment extends MastodonToolbarFragment implements OnBackPr
charLimit=instance.configuration.statuses.maxCharacters; charLimit=instance.configuration.statuses.maxCharacters;
else else
charLimit=500; charLimit=500;
if (editingStatus == null) loadDefaultStatusVisibility(savedInstanceState);
} }
@Override @Override
@@ -246,6 +252,7 @@ public class ComposeFragment extends MastodonToolbarFragment implements OnBackPr
UiUtils.removeCallbacks(updateUploadEtaRunnable); UiUtils.removeCallbacks(updateUploadEtaRunnable);
updateUploadEtaRunnable=null; updateUploadEtaRunnable=null;
} }
getActivity().getWindow().setNavigationBarColor(navigationBarColorBefore);
} }
@Override @Override
@@ -255,6 +262,7 @@ public class ComposeFragment extends MastodonToolbarFragment implements OnBackPr
wm=activity.getSystemService(WindowManager.class); wm=activity.getSystemService(WindowManager.class);
} }
@SuppressLint("ClickableViewAccessibility")
@Override @Override
public View onCreateContentView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState){ public View onCreateContentView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState){
creatingView=true; creatingView=true;
@@ -291,11 +299,22 @@ public class ComposeFragment extends MastodonToolbarFragment implements OnBackPr
sensitiveItem=view.findViewById(R.id.sensitive_item); sensitiveItem=view.findViewById(R.id.sensitive_item);
replyText=view.findViewById(R.id.reply_text); replyText=view.findViewById(R.id.reply_text);
if(GlobalUserPreferences.relocatePublishButton){
publishButton=view.findViewById(R.id.publish);
// publishButton.setText(editingStatus==null || redraftStatus ? R.string.publish : R.string.save);
publishButton.setEllipsize(TextUtils.TruncateAt.END);
publishButton.setOnClickListener(this::onPublishClick);
publishButton.setSingleLine(true);
publishButton.setVisibility(View.VISIBLE);
}
mediaBtn.setOnClickListener(v->openFilePicker()); mediaBtn.setOnClickListener(v->openFilePicker());
pollBtn.setOnClickListener(v->togglePoll()); pollBtn.setOnClickListener(v->togglePoll());
emojiBtn.setOnClickListener(v->emojiKeyboard.toggleKeyboardPopup(mainEditText)); emojiBtn.setOnClickListener(v->emojiKeyboard.toggleKeyboardPopup(mainEditText));
spoilerBtn.setOnClickListener(v->toggleSpoiler()); spoilerBtn.setOnClickListener(v->toggleSpoiler());
visibilityBtn.setOnClickListener(this::onVisibilityClick); buildVisibilityPopup(visibilityBtn);
visibilityBtn.setOnClickListener(v->visibilityPopup.show());
visibilityBtn.setOnTouchListener(visibilityPopup.getDragToOpenListener());
sensitiveItem.setOnClickListener(v->toggleSensitive()); sensitiveItem.setOnClickListener(v->toggleSensitive());
emojiKeyboard.setOnIconChangedListener(new PopupKeyboard.OnIconChangeListener(){ emojiKeyboard.setOnIconChangedListener(new PopupKeyboard.OnIconChangeListener(){
@Override @Override
@@ -389,6 +408,12 @@ public class ComposeFragment extends MastodonToolbarFragment implements OnBackPr
loadDefaultStatusVisibility(savedInstanceState); loadDefaultStatusVisibility(savedInstanceState);
updateVisibilityIcon(); updateVisibilityIcon();
visibilityPopup.getMenu().findItem(switch(statusVisibility){
case PUBLIC -> R.id.vis_public;
case UNLISTED -> R.id.vis_unlisted;
case PRIVATE -> R.id.vis_followers;
case DIRECT -> R.id.vis_private;
}).setChecked(true);
autocompleteViewController=new ComposeAutocompleteViewController(getActivity(), accountID); autocompleteViewController=new ComposeAutocompleteViewController(getActivity(), accountID);
autocompleteViewController.setCompletionSelectedListener(this::onAutocompleteOptionSelected); autocompleteViewController.setCompletionSelectedListener(this::onAutocompleteOptionSelected);
@@ -592,6 +617,11 @@ public class ComposeFragment extends MastodonToolbarFragment implements OnBackPr
ignoreSelectionChanges=false; ignoreSelectionChanges=false;
initialText=prefilledText; initialText=prefilledText;
} }
if (getArguments().containsKey("selectionStart") || getArguments().containsKey("selectionEnd")) {
int selectionStart=getArguments().getInt("selectionStart", 0);
int selectionEnd=getArguments().getInt("selectionEnd", selectionStart);
mainEditText.setSelection(selectionStart, selectionEnd);
}
ArrayList<Uri> mediaUris=getArguments().getParcelableArrayList("mediaAttachments"); ArrayList<Uri> mediaUris=getArguments().getParcelableArrayList("mediaAttachments");
if(mediaUris!=null && !mediaUris.isEmpty()){ if(mediaUris!=null && !mediaUris.isEmpty()){
for(Uri uri:mediaUris){ for(Uri uri:mediaUris){
@@ -611,9 +641,11 @@ public class ComposeFragment extends MastodonToolbarFragment implements OnBackPr
@Override @Override
public void onCreateOptionsMenu(Menu menu, MenuInflater inflater){ public void onCreateOptionsMenu(Menu menu, MenuInflater inflater){
publishButton=new Button(getActivity()); if(!GlobalUserPreferences.relocatePublishButton){
publishButton.setText(editingStatus==null || redraftStatus ? R.string.publish : R.string.save); publishButton=new Button(getActivity());
publishButton.setOnClickListener(this::onPublishClick); publishButton.setText(editingStatus==null || redraftStatus ? R.string.publish : R.string.save);
publishButton.setOnClickListener(this::onPublishClick);
}
LinearLayout wrap=new LinearLayout(getActivity()); LinearLayout wrap=new LinearLayout(getActivity());
wrap.setOrientation(LinearLayout.HORIZONTAL); wrap.setOrientation(LinearLayout.HORIZONTAL);
@@ -636,7 +668,10 @@ public class ComposeFragment extends MastodonToolbarFragment implements OnBackPr
langParams.setMarginEnd(V.dp(8)); langParams.setMarginEnd(V.dp(8));
wrap.addView(buildLanguageSelector(), langParams); wrap.addView(buildLanguageSelector(), langParams);
wrap.addView(publishButton, new LinearLayout.LayoutParams(ViewGroup.LayoutParams.WRAP_CONTENT, ViewGroup.LayoutParams.WRAP_CONTENT)); if(!GlobalUserPreferences.relocatePublishButton){
wrap.addView(publishButton, new LinearLayout.LayoutParams(ViewGroup.LayoutParams.WRAP_CONTENT, ViewGroup.LayoutParams.WRAP_CONTENT));
}
wrap.setPadding(V.dp(16), V.dp(4), V.dp(16), V.dp(8)); wrap.setPadding(V.dp(16), V.dp(4), V.dp(16), V.dp(8));
wrap.setClipToPadding(false); wrap.setClipToPadding(false);
MenuItem item=menu.add(editingStatus==null ? R.string.publish : R.string.save); MenuItem item=menu.add(editingStatus==null ? R.string.publish : R.string.save);
@@ -1396,19 +1431,13 @@ public class ComposeFragment extends MastodonToolbarFragment implements OnBackPr
return attachments.size(); return attachments.size();
} }
private void onVisibilityClick(View v){ private void buildVisibilityPopup(View v){
PopupMenu menu=new PopupMenu(getActivity(), v); visibilityPopup=new PopupMenu(getActivity(), v);
menu.inflate(R.menu.compose_visibility); visibilityPopup.inflate(R.menu.compose_visibility);
Menu m=menu.getMenu(); Menu m=visibilityPopup.getMenu();
UiUtils.enablePopupMenuIcons(getActivity(), menu); UiUtils.enablePopupMenuIcons(getActivity(), visibilityPopup);
m.setGroupCheckable(0, true, true); m.setGroupCheckable(0, true, true);
m.findItem(switch(statusVisibility){ visibilityPopup.setOnMenuItemClickListener(new PopupMenu.OnMenuItemClickListener(){
case PUBLIC -> R.id.vis_public;
case UNLISTED -> R.id.vis_unlisted;
case PRIVATE -> R.id.vis_followers;
case DIRECT -> R.id.vis_private;
}).setChecked(true);
menu.setOnMenuItemClickListener(new PopupMenu.OnMenuItemClickListener(){
@Override @Override
public boolean onMenuItemClick(MenuItem item){ public boolean onMenuItemClick(MenuItem item){
int id=item.getItemId(); int id=item.getItemId();
@@ -1426,7 +1455,6 @@ public class ComposeFragment extends MastodonToolbarFragment implements OnBackPr
return true; return true;
} }
}); });
menu.show();
} }
private void loadDefaultStatusVisibility(Bundle savedInstanceState) { private void loadDefaultStatusVisibility(Bundle savedInstanceState) {

View File

@@ -302,7 +302,7 @@ public class FollowRequestsListFragment extends BaseRecyclerFragment<FollowReque
RecyclerView.Adapter<? extends RecyclerView.ViewHolder> adapter = getBindingAdapter(); RecyclerView.Adapter<? extends RecyclerView.ViewHolder> adapter = getBindingAdapter();
if (!rel.requested && !rel.followedBy && adapter != null) { if (!rel.requested && !rel.followedBy && adapter != null) {
data.remove(item); data.remove(item);
adapter.notifyItemRemoved(getBindingAdapterPosition()); adapter.notifyItemRemoved(getLayoutPosition());
} else { } else {
rebind(); rebind();
} }

View File

@@ -0,0 +1,107 @@
package org.joinmastodon.android.fragments;
import android.os.Bundle;
import android.view.ViewGroup;
import android.widget.TextView;
import androidx.annotation.NonNull;
import androidx.recyclerview.widget.RecyclerView;
import org.joinmastodon.android.R;
import org.joinmastodon.android.api.requests.tags.GetFollowedHashtags;
import org.joinmastodon.android.model.Hashtag;
import org.joinmastodon.android.model.HeaderPaginationList;
import org.joinmastodon.android.ui.utils.UiUtils;
import me.grishka.appkit.api.SimpleCallback;
import me.grishka.appkit.fragments.BaseRecyclerFragment;
import me.grishka.appkit.utils.BindableViewHolder;
import me.grishka.appkit.views.UsableRecyclerView;
public class FollowedHashtagsFragment extends BaseRecyclerFragment<Hashtag> implements ScrollableToTop {
private String nextMaxID;
private String accountId;
public FollowedHashtagsFragment() {
super(20);
}
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
Bundle args=getArguments();
accountId=args.getString("account");
setTitle(R.string.sk_hashtags_you_follow);
}
@Override
protected void onShown(){
super.onShown();
if(!getArguments().getBoolean("noAutoLoad") && !loaded && !dataLoading)
loadData();
}
@Override
protected void doLoadData(int offset, int count){
currentRequest=new GetFollowedHashtags(offset==0 ? null : nextMaxID, null, count, null)
.setCallback(new SimpleCallback<>(this){
@Override
public void onSuccess(HeaderPaginationList<Hashtag> result){
if(result.nextPageUri!=null)
nextMaxID=result.nextPageUri.getQueryParameter("max_id");
else
nextMaxID=null;
onDataLoaded(result, nextMaxID!=null);
}
})
.exec(accountId);
}
@Override
protected RecyclerView.Adapter getAdapter() {
return new HashtagsAdapter();
}
@Override
public void scrollToTop() {
smoothScrollRecyclerViewToTop(list);
}
private class HashtagsAdapter extends RecyclerView.Adapter<HashtagViewHolder>{
@NonNull
@Override
public HashtagViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType){
return new HashtagViewHolder();
}
@Override
public void onBindViewHolder(@NonNull HashtagViewHolder holder, int position) {
holder.bind(data.get(position));
}
@Override
public int getItemCount() {
return data.size();
}
}
private class HashtagViewHolder extends BindableViewHolder<Hashtag> implements UsableRecyclerView.Clickable{
private final TextView title;
public HashtagViewHolder(){
super(getActivity(), R.layout.item_text, list);
title=findViewById(R.id.title);
}
@Override
public void onBind(Hashtag item) {
title.setText(item.name);
title.setCompoundDrawablesRelativeWithIntrinsicBounds(itemView.getContext().getDrawable(R.drawable.ic_fluent_number_symbol_24_regular), null, null, null);
}
@Override
public void onClick() {
UiUtils.openHashtagTimeline(getActivity(), accountId, item.name, item.following);
}
}
}

View File

@@ -1,14 +1,9 @@
package org.joinmastodon.android.fragments; package org.joinmastodon.android.fragments;
import android.os.Bundle; import android.os.Bundle;
import android.view.Menu;
import android.view.MenuInflater;
import android.view.MenuItem;
import android.view.View; import android.view.View;
import android.view.ViewGroup; import android.view.ViewGroup;
import android.widget.Button;
import android.widget.CheckBox; import android.widget.CheckBox;
import android.widget.LinearLayout;
import android.widget.TextView; import android.widget.TextView;
import androidx.annotation.NonNull; import androidx.annotation.NonNull;
@@ -23,17 +18,13 @@ import org.joinmastodon.android.model.ListTimeline;
import org.joinmastodon.android.ui.utils.UiUtils; import org.joinmastodon.android.ui.utils.UiUtils;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections; import java.util.Collections;
import java.util.HashMap; import java.util.HashMap;
import java.util.List; import java.util.List;
import java.util.Map;
import me.grishka.appkit.api.ErrorResponse;
import me.grishka.appkit.api.SimpleCallback; import me.grishka.appkit.api.SimpleCallback;
import me.grishka.appkit.fragments.BaseRecyclerFragment; import me.grishka.appkit.fragments.BaseRecyclerFragment;
import me.grishka.appkit.utils.BindableViewHolder; import me.grishka.appkit.utils.BindableViewHolder;
import me.grishka.appkit.utils.V;
import me.grishka.appkit.views.UsableRecyclerView; import me.grishka.appkit.views.UsableRecyclerView;
public class ListTimelinesFragment extends BaseRecyclerFragment<ListTimeline> implements ScrollableToTop { public class ListTimelinesFragment extends BaseRecyclerFragment<ListTimeline> implements ScrollableToTop {
@@ -159,7 +150,7 @@ public class ListTimelinesFragment extends BaseRecyclerFragment<ListTimeline> im
private final CheckBox listToggle; private final CheckBox listToggle;
public ListViewHolder(){ public ListViewHolder(){
super(getActivity(), R.layout.item_list_timeline, list); super(getActivity(), R.layout.item_text, list);
title=findViewById(R.id.title); title=findViewById(R.id.title);
listToggle=findViewById(R.id.list_toggle); listToggle=findViewById(R.id.list_toggle);
} }
@@ -167,8 +158,10 @@ public class ListTimelinesFragment extends BaseRecyclerFragment<ListTimeline> im
@Override @Override
public void onBind(ListTimeline item) { public void onBind(ListTimeline item) {
title.setText(item.title); title.setText(item.title);
title.setCompoundDrawablesRelativeWithIntrinsicBounds(itemView.getContext().getDrawable(R.drawable.ic_fluent_people_community_24_regular), null, null, null);
if (profileAccountId != null) { if (profileAccountId != null) {
Boolean checked = userInList.get(item.id); Boolean checked = userInList.get(item.id);
listToggle.setVisibility(View.VISIBLE);
listToggle.setChecked(userInList.containsKey(item.id) && checked != null && checked); listToggle.setChecked(userInList.containsKey(item.id) && checked != null && checked);
listToggle.setOnClickListener(this::onClickToggle); listToggle.setOnClickListener(this::onClickToggle);
} else { } else {

View File

@@ -14,6 +14,7 @@ import android.widget.FrameLayout;
import android.widget.LinearLayout; import android.widget.LinearLayout;
import org.joinmastodon.android.E; import org.joinmastodon.android.E;
import org.joinmastodon.android.GlobalUserPreferences;
import org.joinmastodon.android.R; import org.joinmastodon.android.R;
import org.joinmastodon.android.api.requests.accounts.GetFollowRequests; import org.joinmastodon.android.api.requests.accounts.GetFollowRequests;
import org.joinmastodon.android.events.FollowRequestHandledEvent; import org.joinmastodon.android.events.FollowRequestHandledEvent;
@@ -109,6 +110,7 @@ public class NotificationsFragment extends MastodonToolbarFragment implements Sc
tabLayout.setTabTextColors(UiUtils.getThemeColor(getActivity(), R.attr.colorTabInactive), UiUtils.getThemeColor(getActivity(), android.R.attr.textColorPrimary)); tabLayout.setTabTextColors(UiUtils.getThemeColor(getActivity(), R.attr.colorTabInactive), UiUtils.getThemeColor(getActivity(), android.R.attr.textColorPrimary));
pager.setOffscreenPageLimit(4); pager.setOffscreenPageLimit(4);
pager.setUserInputEnabled(!GlobalUserPreferences.disableSwipe);
pager.setAdapter(new DiscoverPagerAdapter()); pager.setAdapter(new DiscoverPagerAdapter());
pager.registerOnPageChangeCallback(new ViewPager2.OnPageChangeCallback(){ pager.registerOnPageChangeCallback(new ViewPager2.OnPageChangeCallback(){
@Override @Override

View File

@@ -10,6 +10,7 @@ import android.app.Activity;
import android.app.Fragment; import android.app.Fragment;
import android.content.ClipData; import android.content.ClipData;
import android.content.ClipboardManager; import android.content.ClipboardManager;
import android.content.Context;
import android.content.Intent; import android.content.Intent;
import android.content.res.Configuration; import android.content.res.Configuration;
import android.graphics.Outline; import android.graphics.Outline;
@@ -18,6 +19,8 @@ import android.graphics.drawable.Drawable;
import android.net.Uri; import android.net.Uri;
import android.os.Build; import android.os.Build;
import android.os.Bundle; import android.os.Bundle;
import android.os.VibrationEffect;
import android.os.Vibrator;
import android.text.SpannableStringBuilder; import android.text.SpannableStringBuilder;
import android.text.TextUtils; import android.text.TextUtils;
import android.text.style.ImageSpan; import android.text.style.ImageSpan;
@@ -234,6 +237,7 @@ public class ProfileFragment extends LoaderFragment implements OnBackPressedList
} }
pager.setOffscreenPageLimit(5); pager.setOffscreenPageLimit(5);
pager.setUserInputEnabled(!GlobalUserPreferences.disableSwipe);
pager.setAdapter(new ProfilePagerAdapter()); pager.setAdapter(new ProfilePagerAdapter());
pager.getLayoutParams().height=getResources().getDisplayMetrics().heightPixels; pager.getLayoutParams().height=getResources().getDisplayMetrics().heightPixels;
@@ -288,10 +292,7 @@ public class ProfileFragment extends LoaderFragment implements OnBackPressedList
if(!username.contains("@")){ if(!username.contains("@")){
username+="@"+AccountSessionManager.getInstance().getAccount(accountID).domain; username+="@"+AccountSessionManager.getInstance().getAccount(accountID).domain;
} }
getActivity().getSystemService(ClipboardManager.class).setPrimaryClip(ClipData.newPlainText(null, "@"+username)); UiUtils.copyText(getActivity(), '@'+username);
if(Build.VERSION.SDK_INT<Build.VERSION_CODES.TIRAMISU){ // Android 13+ SystemUI shows its own thing when you put things into the clipboard
Toast.makeText(getActivity(), R.string.text_copied, Toast.LENGTH_SHORT).show();
}
return true; return true;
}); });
@@ -623,6 +624,10 @@ public class ProfileFragment extends LoaderFragment implements OnBackPressedList
args.putString("profileAccount", profileAccountID); args.putString("profileAccount", profileAccountID);
args.putString("profileDisplayUsername", account.getDisplayUsername()); args.putString("profileDisplayUsername", account.getDisplayUsername());
Nav.go(getActivity(), ListTimelinesFragment.class, args); Nav.go(getActivity(), ListTimelinesFragment.class, args);
}else if(id==R.id.followed_hashtags){
Bundle args=new Bundle();
args.putString("account", accountID);
Nav.go(getActivity(), FollowedHashtagsFragment.class, args);
} }
return true; return true;
} }

View File

@@ -9,8 +9,10 @@ import android.graphics.Canvas;
import android.graphics.Rect; import android.graphics.Rect;
import android.os.Build; import android.os.Build;
import android.os.Bundle; import android.os.Bundle;
import android.provider.Settings;
import android.view.Gravity; import android.view.Gravity;
import android.view.LayoutInflater; import android.view.LayoutInflater;
import android.view.MenuItem;
import android.view.View; import android.view.View;
import android.view.ViewGroup; import android.view.ViewGroup;
import android.view.WindowInsets; import android.view.WindowInsets;
@@ -31,6 +33,7 @@ import com.squareup.otto.Subscribe;
import org.joinmastodon.android.BuildConfig; import org.joinmastodon.android.BuildConfig;
import org.joinmastodon.android.E; import org.joinmastodon.android.E;
import org.joinmastodon.android.GlobalUserPreferences; import org.joinmastodon.android.GlobalUserPreferences;
import org.joinmastodon.android.GlobalUserPreferences.ColorPreference;
import org.joinmastodon.android.MainActivity; import org.joinmastodon.android.MainActivity;
import org.joinmastodon.android.MastodonApp; import org.joinmastodon.android.MastodonApp;
import org.joinmastodon.android.R; import org.joinmastodon.android.R;
@@ -48,7 +51,6 @@ import org.joinmastodon.android.ui.utils.UiUtils;
import org.joinmastodon.android.updater.GithubSelfUpdater; import org.joinmastodon.android.updater.GithubSelfUpdater;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Objects;
import java.util.function.Consumer; import java.util.function.Consumer;
import androidx.annotation.DrawableRes; import androidx.annotation.DrawableRes;
@@ -96,11 +98,29 @@ public class SettingsFragment extends MastodonToolbarFragment{
items.add(new HeaderItem(R.string.settings_theme)); items.add(new HeaderItem(R.string.settings_theme));
items.add(themeItem=new ThemeItem()); items.add(themeItem=new ThemeItem());
items.add(new SwitchItem(R.string.theme_true_black, R.drawable.ic_fluent_dark_theme_24_regular, GlobalUserPreferences.trueBlackTheme, this::onTrueBlackThemeChanged)); items.add(new SwitchItem(R.string.theme_true_black, R.drawable.ic_fluent_dark_theme_24_regular, GlobalUserPreferences.trueBlackTheme, this::onTrueBlackThemeChanged));
items.add(new SwitchItem(R.string.disable_marquee, R.drawable.ic_fluent_text_more_24_regular, GlobalUserPreferences.disableMarquee, i->{ items.add(new SwitchItem(R.string.sk_disable_marquee, R.drawable.ic_fluent_text_more_24_regular, GlobalUserPreferences.disableMarquee, i->{
GlobalUserPreferences.disableMarquee=i.checked; GlobalUserPreferences.disableMarquee=i.checked;
GlobalUserPreferences.save(); GlobalUserPreferences.save();
})); }));
items.add(new ColorPicker()); items.add(new ButtonItem(R.string.sk_settings_color_palette, R.drawable.ic_fluent_color_24_regular, b->{
PopupMenu popupMenu=new PopupMenu(getActivity(), b, Gravity.CENTER_HORIZONTAL);
popupMenu.inflate(R.menu.color_palettes);
popupMenu.getMenu().findItem(R.id.m3_color).setVisible(Build.VERSION.SDK_INT >= Build.VERSION_CODES.S);
popupMenu.setOnMenuItemClickListener(SettingsFragment.this::onColorPreferenceClick);
b.setOnTouchListener(popupMenu.getDragToOpenListener());
b.setOnClickListener(v->popupMenu.show());
b.setText(switch(GlobalUserPreferences.color){
case MATERIAL3 -> R.string.sk_color_palette_material3;
case PINK -> R.string.sk_color_palette_pink;
case PURPLE -> R.string.sk_color_palette_purple;
case GREEN -> R.string.sk_color_palette_green;
case BLUE -> R.string.sk_color_palette_blue;
case BROWN -> R.string.sk_color_palette_brown;
case RED -> R.string.sk_color_palette_red;
case YELLOW -> R.string.sk_color_palette_yellow;
case NORD -> R.string.sk_color_palette_nord;
});
}));
items.add(new HeaderItem(R.string.settings_behavior)); items.add(new HeaderItem(R.string.settings_behavior));
items.add(new SwitchItem(R.string.settings_gif, R.drawable.ic_fluent_gif_24_regular, GlobalUserPreferences.playGifs, i->{ items.add(new SwitchItem(R.string.settings_gif, R.drawable.ic_fluent_gif_24_regular, GlobalUserPreferences.playGifs, i->{
@@ -115,10 +135,25 @@ public class SettingsFragment extends MastodonToolbarFragment{
GlobalUserPreferences.showInteractionCounts=i.checked; GlobalUserPreferences.showInteractionCounts=i.checked;
GlobalUserPreferences.save(); GlobalUserPreferences.save();
})); }));
items.add(new SwitchItem(R.string.settings_always_reveal_content_warnings, R.drawable.ic_fluent_chat_warning_24_regular, GlobalUserPreferences.alwaysExpandContentWarnings, i->{ items.add(new SwitchItem(R.string.sk_settings_always_reveal_content_warnings, R.drawable.ic_fluent_chat_warning_24_regular, GlobalUserPreferences.alwaysExpandContentWarnings, i->{
GlobalUserPreferences.alwaysExpandContentWarnings=i.checked; GlobalUserPreferences.alwaysExpandContentWarnings=i.checked;
GlobalUserPreferences.save(); GlobalUserPreferences.save();
})); }));
items.add(new SwitchItem(R.string.sk_tabs_disable_swipe, R.drawable.ic_fluent_swipe_right_24_regular, GlobalUserPreferences.disableSwipe, i->{
GlobalUserPreferences.disableSwipe=i.checked;
GlobalUserPreferences.save();
needAppRestart=true;
}));
items.add(new SwitchItem(R.string.sk_settings_show_differentiated_notification_icons, R.drawable.ic_fluent_earth_24_regular, GlobalUserPreferences.showDifferentiatedPushNoticationIcons, this::onNotificationStyleChanged));
items.add(new SwitchItem(R.string.sk_disable_dividers, R.drawable.ic_fluent_timeline_24_regular, GlobalUserPreferences.disableDividers, i->{
GlobalUserPreferences.disableDividers=i.checked;
GlobalUserPreferences.save();
needAppRestart=true;
}));
items.add(new SwitchItem(R.string.sk_relocate_publish_button, R.drawable.ic_fluent_arrow_autofit_down_24_regular, GlobalUserPreferences.relocatePublishButton, i->{
GlobalUserPreferences.relocatePublishButton=i.checked;
GlobalUserPreferences.save();
}));
items.add(new HeaderItem(R.string.home_timeline)); items.add(new HeaderItem(R.string.home_timeline));
items.add(new SwitchItem(R.string.sk_settings_show_replies, R.drawable.ic_fluent_chat_multiple_24_regular, GlobalUserPreferences.showReplies, i->{ items.add(new SwitchItem(R.string.sk_settings_show_replies, R.drawable.ic_fluent_chat_multiple_24_regular, GlobalUserPreferences.showReplies, i->{
@@ -158,15 +193,16 @@ public class SettingsFragment extends MastodonToolbarFragment{
checkForUpdateItem = new TextItem(R.string.sk_check_for_update, GithubSelfUpdater.getInstance()::checkForUpdates); checkForUpdateItem = new TextItem(R.string.sk_check_for_update, GithubSelfUpdater.getInstance()::checkForUpdates);
items.add(checkForUpdateItem); items.add(checkForUpdateItem);
} }
items.add(new TextItem(R.string.settings_contribute_fork, ()->UiUtils.launchWebBrowser(getActivity(), "https://github.com/LucasGGamerM/moshidon"))); items.add(new TextItem(R.string.sk_settings_contribute, ()->UiUtils.launchWebBrowser(getActivity(), "https://github.com/LucasGGamerM/moshidon")));
items.add(new TextItem(R.string.sk_settings_donate, ()->UiUtils.launchWebBrowser(getActivity(), "https://github.com/sponsors/LucasGGamerM"), R.drawable.ic_fluent_heart_24_regular));
items.add(new TextItem(R.string.settings_clear_cache, this::clearImageCache)); items.add(new TextItem(R.string.settings_clear_cache, this::clearImageCache));
items.add(new TextItem(R.string.clear_recent_languages, ()->UiUtils.showConfirmationAlert(getActivity(), R.string.clear_recent_languages, R.string.confirm_clear_recent_languages, R.string.clear, ()->{ items.add(new TextItem(R.string.sk_clear_recent_languages, ()->UiUtils.showConfirmationAlert(getActivity(), R.string.sk_clear_recent_languages, R.string.sk_confirm_clear_recent_languages, R.string.clear, ()->{
GlobalUserPreferences.recentLanguages.remove(accountID); GlobalUserPreferences.recentLanguages.remove(accountID);
GlobalUserPreferences.save(); GlobalUserPreferences.save();
}))); })));
items.add(new TextItem(R.string.log_out, this::confirmLogOut)); items.add(new TextItem(R.string.log_out, this::confirmLogOut));
items.add(new FooterItem(getString(R.string.settings_app_version, BuildConfig.VERSION_NAME, BuildConfig.VERSION_CODE))); items.add(new FooterItem(getString(R.string.sk_settings_app_version, BuildConfig.VERSION_NAME, BuildConfig.VERSION_CODE)));
} }
@Override @Override
@@ -241,13 +277,29 @@ public class SettingsFragment extends MastodonToolbarFragment{
restartActivityToApplyNewTheme(); restartActivityToApplyNewTheme();
} }
private void onColorPreferenceClick(GlobalUserPreferences.ColorPreference color){ private boolean onColorPreferenceClick(MenuItem item){
ColorPreference pref = null;
int id = item.getItemId();
GlobalUserPreferences.color=color; if (id == R.id.m3_color) pref = ColorPreference.MATERIAL3;
else if (id == R.id.pink_color) pref = ColorPreference.PINK;
else if (id == R.id.purple_color) pref = ColorPreference.PURPLE;
else if (id == R.id.green_color) pref = ColorPreference.GREEN;
else if (id == R.id.blue_color) pref = ColorPreference.BLUE;
else if (id == R.id.brown_color) pref = ColorPreference.BROWN;
else if (id == R.id.red_color) pref = ColorPreference.RED;
else if (id == R.id.yellow_color) pref = ColorPreference.YELLOW;
else if (id == R.id.nord_color) pref = ColorPreference.NORD;
if (pref == null) return false;
GlobalUserPreferences.color=pref;
GlobalUserPreferences.save(); GlobalUserPreferences.save();
restartActivityToApplyNewTheme(); restartActivityToApplyNewTheme();
return true;
} }
private void onTrueBlackThemeChanged(SwitchItem item){ private void onTrueBlackThemeChanged(SwitchItem item){
GlobalUserPreferences.trueBlackTheme=item.checked; GlobalUserPreferences.trueBlackTheme=item.checked;
GlobalUserPreferences.save(); GlobalUserPreferences.save();
@@ -312,6 +364,12 @@ public class SettingsFragment extends MastodonToolbarFragment{
needUpdateNotificationSettings=true; needUpdateNotificationSettings=true;
} }
private void onNotificationStyleChanged(SwitchItem item){
GlobalUserPreferences.showDifferentiatedPushNoticationIcons=item.checked;
GlobalUserPreferences.save();
}
private void onNotificationsPolicyChanged(PushSubscription.Policy policy){ private void onNotificationsPolicyChanged(PushSubscription.Policy policy){
PushSubscription subscription=getPushSubscription(); PushSubscription subscription=getPushSubscription();
PushSubscription.Policy prevPolicy=subscription.policy; PushSubscription.Policy prevPolicy=subscription.policy;
@@ -451,6 +509,23 @@ public class SettingsFragment extends MastodonToolbarFragment{
} }
} }
public class ButtonItem extends Item{
private int text;
private int icon;
private Consumer<Button> buttonConsumer;
public ButtonItem(@StringRes int text, @DrawableRes int icon, Consumer<Button> buttonConsumer) {
this.text = text;
this.icon = icon;
this.buttonConsumer = buttonConsumer;
}
@Override
public int getViewType(){
return 8;
}
}
public class ColorPicker extends Item{ public class ColorPicker extends Item{
@Override @Override
public int getViewType(){ public int getViewType(){
@@ -478,15 +553,25 @@ public class SettingsFragment extends MastodonToolbarFragment{
private String text; private String text;
private Runnable onClick; private Runnable onClick;
private boolean loading; private boolean loading;
private int icon;
public TextItem(@StringRes int text, Runnable onClick) { public TextItem(@StringRes int text, Runnable onClick) {
this(text, onClick, false); this(text, onClick, false, 0);
} }
public TextItem(@StringRes int text, Runnable onClick, boolean loading){ public TextItem(@StringRes int text, Runnable onClick, boolean loading) {
this(text, onClick, loading, 0);
}
public TextItem(@StringRes int text, Runnable onClick, @DrawableRes int icon) {
this(text, onClick, false, icon);
}
public TextItem(@StringRes int text, Runnable onClick, boolean loading, @DrawableRes int icon){
this.text=getString(text); this.text=getString(text);
this.onClick=onClick; this.onClick=onClick;
this.loading=loading; this.loading=loading;
this.icon=icon;
} }
@Override @Override
@@ -542,7 +627,7 @@ public class SettingsFragment extends MastodonToolbarFragment{
case 5 -> new HeaderViewHolder(true); case 5 -> new HeaderViewHolder(true);
case 6 -> new FooterViewHolder(); case 6 -> new FooterViewHolder();
case 7 -> new UpdateViewHolder(); case 7 -> new UpdateViewHolder();
case 8 -> new ColorPickerViewHolder(); case 8 -> new ButtonViewHolder();
default -> throw new IllegalStateException("Unexpected value: "+viewType); default -> throw new IllegalStateException("Unexpected value: "+viewType);
}; };
} }
@@ -671,75 +756,25 @@ public class SettingsFragment extends MastodonToolbarFragment{
} }
} }
} }
private class ColorPickerViewHolder extends BindableViewHolder<ColorPicker>{
private class ButtonViewHolder extends BindableViewHolder<ButtonItem>{
private final Button button; private final Button button;
private final PopupMenu popupMenu;
private final ImageView icon; private final ImageView icon;
private final TextView text;
@SuppressLint("ClickableViewAccessibility") @SuppressLint("ClickableViewAccessibility")
public ColorPickerViewHolder(){ public ButtonViewHolder(){
super(getActivity(), R.layout.item_settings_color_picker, list); super(getActivity(), R.layout.item_settings_button, list);
text=findViewById(R.id.text);
icon=findViewById(R.id.icon); icon=findViewById(R.id.icon);
button=findViewById(R.id.color_picker_button); button=findViewById(R.id.button);
popupMenu=new PopupMenu(getActivity(), button, Gravity.CENTER_HORIZONTAL);
popupMenu.inflate(R.menu.color_picker);
popupMenu.setOnMenuItemClickListener(item->{
GlobalUserPreferences.ColorPreference pref;
int id=item.getItemId();
if(id==R.id.pink_color) {
pref = GlobalUserPreferences.ColorPreference.PINK;
onColorPreferenceClick(pref);
}
else if(id==R.id.purple_color) {
pref = GlobalUserPreferences.ColorPreference.PURPLE;
onColorPreferenceClick(pref);
}
else if(id==R.id.green_color) {
pref = GlobalUserPreferences.ColorPreference.GREEN;
onColorPreferenceClick(pref);
}
else if(id==R.id.blue_color) {
pref = GlobalUserPreferences.ColorPreference.BLUE;
onColorPreferenceClick(pref);
}
else if(id==R.id.orange_color) {
pref = GlobalUserPreferences.ColorPreference.ORANGE;
onColorPreferenceClick(pref);
}
else if(id==R.id.yellow_color) {
pref = GlobalUserPreferences.ColorPreference.YELLOW;
onColorPreferenceClick(pref);
}
else if(id==R.id.m3_color) {
if (android.os.Build.VERSION.SDK_INT >= Build.VERSION_CODES.S) {
pref = GlobalUserPreferences.ColorPreference.MATERIAL3;
onColorPreferenceClick(pref);
}else{
Toast.makeText(getActivity(), R.string.sk_not_supported,
Toast.LENGTH_LONG).show();
}
}
else
return false;
return true;
});
// UiUtils.enablePopupMenuIcons(getActivity(), popupMenu);
button.setOnTouchListener(popupMenu.getDragToOpenListener());
button.setOnClickListener(v->popupMenu.show());
} }
@Override @Override
public void onBind(ColorPicker item){ public void onBind(ButtonItem item){
icon.setImageResource(R.drawable.ic_color_theme_preference); text.setText(item.text);
button.setText(switch(GlobalUserPreferences.color){ icon.setImageResource(item.icon);
case PINK -> R.string.sk_color_theme_pink; item.buttonConsumer.accept(button);
case PURPLE -> R.string.sk_color_theme_purple;
case GREEN -> R.string.sk_color_theme_green;
case BLUE -> R.string.sk_color_theme_blue;
case ORANGE -> R.string.sk_color_theme_brown;
case YELLOW -> R.string.sk_color_theme_yellow;
case MATERIAL3 -> R.string.sk_color_theme_material3;
});
} }
} }
@@ -789,17 +824,20 @@ public class SettingsFragment extends MastodonToolbarFragment{
private class TextViewHolder extends BindableViewHolder<TextItem> implements UsableRecyclerView.Clickable{ private class TextViewHolder extends BindableViewHolder<TextItem> implements UsableRecyclerView.Clickable{
private final TextView text; private final TextView text;
private final ProgressBar progress; private final ProgressBar progress;
private final ImageView icon;
public TextViewHolder(){ public TextViewHolder(){
super(getActivity(), R.layout.item_settings_text, list); super(getActivity(), R.layout.item_settings_text, list);
text = itemView.findViewById(R.id.text); text = itemView.findViewById(R.id.text);
progress = itemView.findViewById(R.id.progress); progress = itemView.findViewById(R.id.progress);
icon = itemView.findViewById(R.id.icon);
} }
@Override @Override
public void onBind(TextItem item){ public void onBind(TextItem item){
text.setText(item.text); text.setText(item.text);
progress.animate().alpha(item.loading ? 1 : 0); progress.animate().alpha(item.loading ? 1 : 0);
if (item.icon != 0) icon.setImageDrawable(getActivity().getTheme().getDrawable(item.icon));
} }
@Override @Override
@@ -823,7 +861,7 @@ public class SettingsFragment extends MastodonToolbarFragment{
private class UpdateViewHolder extends BindableViewHolder<UpdateItem>{ private class UpdateViewHolder extends BindableViewHolder<UpdateItem>{
private final TextView text; private final TextView text, changelog;
private final Button button; private final Button button;
private final ImageButton cancelBtn; private final ImageButton cancelBtn;
private final ProgressBar progress; private final ProgressBar progress;
@@ -834,6 +872,7 @@ public class SettingsFragment extends MastodonToolbarFragment{
public UpdateViewHolder(){ public UpdateViewHolder(){
super(getActivity(), R.layout.item_settings_update, list); super(getActivity(), R.layout.item_settings_update, list);
text=findViewById(R.id.text); text=findViewById(R.id.text);
changelog=findViewById(R.id.changelog);
button=findViewById(R.id.button); button=findViewById(R.id.button);
cancelBtn=findViewById(R.id.cancel_btn); cancelBtn=findViewById(R.id.cancel_btn);
progress=findViewById(R.id.progress); progress=findViewById(R.id.progress);
@@ -858,10 +897,10 @@ public class SettingsFragment extends MastodonToolbarFragment{
if (state == GithubSelfUpdater.UpdateState.CHECKING) return; if (state == GithubSelfUpdater.UpdateState.CHECKING) return;
GithubSelfUpdater.UpdateInfo info=updater.getUpdateInfo(); GithubSelfUpdater.UpdateInfo info=updater.getUpdateInfo();
if(state!=GithubSelfUpdater.UpdateState.DOWNLOADED){ if(state!=GithubSelfUpdater.UpdateState.DOWNLOADED){
text.setText(getString(R.string.update_available, info.version)); text.setText(getString(R.string.sk_update_available, info.version));
button.setText(getString(R.string.download_update, UiUtils.formatFileSize(getActivity(), info.size, false))); button.setText(getString(R.string.download_update, UiUtils.formatFileSize(getActivity(), info.size, false)));
}else{ }else{
text.setText(getString(R.string.update_ready, info.version)); text.setText(getString(R.string.sk_update_ready, info.version));
button.setText(R.string.install_update); button.setText(R.string.install_update);
} }
if(state==GithubSelfUpdater.UpdateState.DOWNLOADING){ if(state==GithubSelfUpdater.UpdateState.DOWNLOADING){
@@ -877,6 +916,8 @@ public class SettingsFragment extends MastodonToolbarFragment{
progress.setVisibility(View.GONE); progress.setVisibility(View.GONE);
progress.removeCallbacks(progressUpdater); progress.removeCallbacks(progressUpdater);
} }
changelog.setText(info.changelog);
// changelog.setText(getString(R.string.sk_changelog, info.changelog));
} }
private void updateProgress(){ private void updateProgress(){

View File

@@ -177,7 +177,7 @@ public abstract class StatusListFragment extends BaseStatusListFragment<Status>{
public void onStatusCountersUpdated(StatusCountersUpdatedEvent ev){ public void onStatusCountersUpdated(StatusCountersUpdatedEvent ev){
for(Status s:data){ for(Status s:data){
if(s.getContentStatus().id.equals(ev.id)){ if(s.getContentStatus().id.equals(ev.id)){
s.update(ev); s.getContentStatus().update(ev);
for(int i=0;i<list.getChildCount();i++){ for(int i=0;i<list.getChildCount();i++){
RecyclerView.ViewHolder holder=list.getChildViewHolder(list.getChildAt(i)); RecyclerView.ViewHolder holder=list.getChildViewHolder(list.getChildAt(i));
if(holder instanceof FooterStatusDisplayItem.Holder footer && footer.getItem().status==s.getContentStatus()){ if(holder instanceof FooterStatusDisplayItem.Holder footer && footer.getItem().status==s.getContentStatus()){
@@ -189,8 +189,8 @@ public abstract class StatusListFragment extends BaseStatusListFragment<Status>{
} }
} }
for(Status s:preloadedData){ for(Status s:preloadedData){
if(s.id.equals(ev.id)){ if(s.getContentStatus().id.equals(ev.id)){
s.update(ev); s.getContentStatus().update(ev);
} }
} }
} }

View File

@@ -23,6 +23,7 @@ import org.joinmastodon.android.R;
import org.joinmastodon.android.api.requests.accounts.GetAccountRelationships; import org.joinmastodon.android.api.requests.accounts.GetAccountRelationships;
import org.joinmastodon.android.api.requests.accounts.SetAccountFollowed; import org.joinmastodon.android.api.requests.accounts.SetAccountFollowed;
import org.joinmastodon.android.api.session.AccountSessionManager; import org.joinmastodon.android.api.session.AccountSessionManager;
import org.joinmastodon.android.fragments.ListTimelinesFragment;
import org.joinmastodon.android.fragments.ProfileFragment; import org.joinmastodon.android.fragments.ProfileFragment;
import org.joinmastodon.android.fragments.report.ReportReasonChoiceFragment; import org.joinmastodon.android.fragments.report.ReportReasonChoiceFragment;
import org.joinmastodon.android.model.Account; import org.joinmastodon.android.model.Account;
@@ -286,6 +287,7 @@ public abstract class BaseAccountListFragment extends BaseRecyclerFragment<BaseA
menu.findItem(R.id.mute).setTitle(getString(relationship.muting ? R.string.unmute_user : R.string.mute_user, account.getDisplayUsername())); menu.findItem(R.id.mute).setTitle(getString(relationship.muting ? R.string.unmute_user : R.string.mute_user, account.getDisplayUsername()));
menu.findItem(R.id.block).setTitle(getString(relationship.blocking ? R.string.unblock_user : R.string.block_user, account.getDisplayUsername())); 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.report).setTitle(getString(R.string.report_user, account.getDisplayUsername()));
menu.findItem(R.id.manage_user_lists).setTitle(getString(R.string.sk_lists_with_user, account.getDisplayUsername())).setVisible(relationship.following);
MenuItem hideBoosts=menu.findItem(R.id.hide_boosts); MenuItem hideBoosts=menu.findItem(R.id.hide_boosts);
MenuItem manageUserLists=menu.findItem(R.id.manage_user_lists); MenuItem manageUserLists=menu.findItem(R.id.manage_user_lists);
if(relationship.following){ if(relationship.following){
@@ -372,6 +374,12 @@ public abstract class BaseAccountListFragment extends BaseRecyclerFragment<BaseA
}) })
.wrapProgress(getActivity(), R.string.loading, false) .wrapProgress(getActivity(), R.string.loading, false)
.exec(accountID); .exec(accountID);
}else if(id==R.id.manage_user_lists){
final Bundle args=new Bundle();
args.putString("account", accountID);
args.putString("profileAccount", account.id);
args.putString("profileDisplayUsername", account.getDisplayUsername());
Nav.go(getActivity(), ListTimelinesFragment.class, args);
} }
return true; return true;
} }

View File

@@ -104,6 +104,7 @@ public class DiscoverFragment extends AppKitFragment implements ScrollableToTop,
tabLayout.setTabTextColors(UiUtils.getThemeColor(getActivity(), R.attr.colorTabInactive), UiUtils.getThemeColor(getActivity(), android.R.attr.textColorPrimary)); tabLayout.setTabTextColors(UiUtils.getThemeColor(getActivity(), R.attr.colorTabInactive), UiUtils.getThemeColor(getActivity(), android.R.attr.textColorPrimary));
pager.setOffscreenPageLimit(4); pager.setOffscreenPageLimit(4);
pager.setUserInputEnabled(!GlobalUserPreferences.disableSwipe);
pager.setAdapter(new DiscoverPagerAdapter()); pager.setAdapter(new DiscoverPagerAdapter());
pager.registerOnPageChangeCallback(new ViewPager2.OnPageChangeCallback(){ pager.registerOnPageChangeCallback(new ViewPager2.OnPageChangeCallback(){
@Override @Override

View File

@@ -36,11 +36,11 @@ import me.grishka.appkit.utils.SingleViewRecyclerAdapter;
import me.grishka.appkit.utils.V; import me.grishka.appkit.utils.V;
import me.grishka.appkit.views.UsableRecyclerView; import me.grishka.appkit.views.UsableRecyclerView;
public class MoshidonLoginFragment extends InstanceCatalogFragment { public class CustomLoginFragment extends InstanceCatalogFragment {
private View headerView; private View headerView;
public MoshidonLoginFragment() { public CustomLoginFragment() {
super(R.layout.fragment_moshidon_welcome, 1); super(R.layout.fragment_welcome_custom, 1);
} }
@Override @Override
@@ -131,7 +131,7 @@ public class MoshidonLoginFragment extends InstanceCatalogFragment {
@Override @Override
protected RecyclerView.Adapter getAdapter(){ protected RecyclerView.Adapter getAdapter(){
headerView=getActivity().getLayoutInflater().inflate(R.layout.header_megalodon_welcome, list, false); headerView=getActivity().getLayoutInflater().inflate(R.layout.header_welcome_custom, list, false);
searchEdit=headerView.findViewById(R.id.search_edit); searchEdit=headerView.findViewById(R.id.search_edit);
searchEdit.setOnEditorActionListener(this::onSearchEnterPressed); searchEdit.setOnEditorActionListener(this::onSearchEnterPressed);
@@ -203,7 +203,7 @@ public class MoshidonLoginFragment extends InstanceCatalogFragment {
private final RadioButton radioButton; private final RadioButton radioButton;
public InstanceViewHolder(){ public InstanceViewHolder(){
super(getActivity(), R.layout.item_moshidon_instance, list); super(getActivity(), R.layout.item_instance_custom, list);
// itemView.setPadding(V.dp(16), V.dp(16), V.dp(16), V.dp(16)); // itemView.setPadding(V.dp(16), V.dp(16), V.dp(16), V.dp(16));
// TypedValue value = new TypedValue(); // TypedValue value = new TypedValue();

View File

@@ -155,7 +155,7 @@ public class SignupFragment extends ToolbarFragment{
} }
private void onButtonClick(){ private void onButtonClick(){
if(!password.getText().equals(passwordConfirm.getText())){ if(!password.getText().toString().equals(passwordConfirm.getText().toString())){
passwordConfirm.setError(getString(R.string.signup_passwords_dont_match)); passwordConfirm.setError(getString(R.string.signup_passwords_dont_match));
passwordConfirmWrap.setErrorState(); passwordConfirmWrap.setErrorState();
return; return;

View File

@@ -50,6 +50,7 @@ public class Status extends BaseModel implements DisplayItemsParent{
public Card card; public Card card;
public String language; public String language;
public String text; public String text;
public String translation;
public boolean favourited; public boolean favourited;
public boolean reblogged; public boolean reblogged;

View File

@@ -1,146 +0,0 @@
package org.joinmastodon.android.model;
import org.joinmastodon.android.GlobalUserPreferences;
import org.joinmastodon.android.api.ObjectValidationException;
import org.joinmastodon.android.api.RequiredField;
import org.joinmastodon.android.events.StatusCountersUpdatedEvent;
import org.joinmastodon.android.ui.text.HtmlParser;
import org.parceler.Parcel;
import java.time.Instant;
import java.util.List;
@Parcel
public class StatusTranslation extends BaseModel implements DisplayItemsParent{
// @RequiredField
public String id;
// @RequiredField
public String uri;
// @RequiredField
public Instant createdAt;
// @RequiredField
public Account account;
// @RequiredField
public String content;
// @RequiredField
public StatusPrivacy visibility;
public boolean sensitive;
// @RequiredField
public String spoilerText;
// @RequiredField
public List<Attachment> mediaAttachments;
public Application application;
// @RequiredField
public List<Mention> mentions;
// @RequiredField
public List<Hashtag> tags;
// @RequiredField
public List<Emoji> emojis;
public long reblogsCount;
public long favouritesCount;
public long repliesCount;
public Instant editedAt;
public String url;
public String inReplyToId;
public String inReplyToAccountId;
public Status reblog;
public Poll poll;
public Card card;
public String language;
public String text;
public boolean favourited;
public boolean reblogged;
public boolean muted;
public boolean bookmarked;
public boolean pinned;
public transient boolean spoilerRevealed;
public transient boolean hasGapAfter;
private transient String strippedText;
@Override
public void postprocess() throws ObjectValidationException{
super.postprocess();
// if(application!=null)
// application.postprocess();
// for(Mention m:mentions)
// m.postprocess();
// for(Hashtag t:tags)
// t.postprocess();
// for(Emoji e:emojis)
// e.postprocess();
// for(Attachment a:mediaAttachments)
// a.postprocess();
// account.postprocess();
// if(poll!=null)
// poll.postprocess();
// if(card!=null)
// card.postprocess();
// if(reblog!=null)
// reblog.postprocess();
// spoilerRevealed=GlobalUserPreferences.alwaysExpandContentWarnings || !sensitive;
}
@Override
public String toString(){
return "Status{"+
"id='"+id+'\''+
", uri='"+uri+'\''+
", createdAt="+createdAt+
", account="+account+
", content='"+content+'\''+
", visibility="+visibility+
", sensitive="+sensitive+
", spoilerText='"+spoilerText+'\''+
", mediaAttachments="+mediaAttachments+
", application="+application+
", mentions="+mentions+
", tags="+tags+
", emojis="+emojis+
", reblogsCount="+reblogsCount+
", favouritesCount="+favouritesCount+
", repliesCount="+repliesCount+
", url='"+url+'\''+
", inReplyToId='"+inReplyToId+'\''+
", inReplyToAccountId='"+inReplyToAccountId+'\''+
", reblog="+reblog+
", poll="+poll+
", card="+card+
", language='"+language+'\''+
", text='"+text+'\''+
", favourited="+favourited+
", reblogged="+reblogged+
", muted="+muted+
", bookmarked="+bookmarked+
", pinned="+pinned+
'}';
}
@Override
public String getID(){
return id;
}
public void update(StatusCountersUpdatedEvent ev){
favouritesCount=ev.favorites;
reblogsCount=ev.reblogs;
repliesCount=ev.replies;
favourited=ev.favorited;
reblogged=ev.reblogged;
bookmarked=ev.bookmarked;
pinned=ev.pinned;
}
public StatusTranslation getContentStatus(){
return this;
}
public String getStrippedText(){
if(strippedText==null)
strippedText=HtmlParser.strip(content);
return strippedText;
}
}

View File

@@ -0,0 +1,7 @@
package org.joinmastodon.android.model;
public class TranslatedStatus extends BaseModel {
public String content;
public String detectedSourceLanguage;
public String provider;
}

View File

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

View File

@@ -12,6 +12,8 @@ import android.widget.ImageView;
import android.widget.ProgressBar; import android.widget.ProgressBar;
import android.widget.TextView; import android.widget.TextView;
import androidx.recyclerview.widget.RecyclerView;
import org.joinmastodon.android.R; import org.joinmastodon.android.R;
import org.joinmastodon.android.fragments.BaseStatusListFragment; import org.joinmastodon.android.fragments.BaseStatusListFragment;
import org.joinmastodon.android.model.Account; import org.joinmastodon.android.model.Account;
@@ -23,7 +25,9 @@ import org.joinmastodon.android.ui.utils.CustomEmojiHelper;
import org.joinmastodon.android.ui.utils.UiUtils; import org.joinmastodon.android.ui.utils.UiUtils;
import org.joinmastodon.android.ui.views.ProgressBarButton; import org.joinmastodon.android.ui.views.ProgressBarButton;
import java.util.ArrayList;
import java.util.Collections; import java.util.Collections;
import java.util.List;
import me.grishka.appkit.imageloader.ImageLoaderViewHolder; import me.grishka.appkit.imageloader.ImageLoaderViewHolder;
import me.grishka.appkit.imageloader.requests.ImageLoaderRequest; import me.grishka.appkit.imageloader.requests.ImageLoaderRequest;
@@ -154,10 +158,18 @@ public class AccountCardStatusDisplayItem extends StatusDisplayItem{
private void onFollowRequestButtonClick(View v) { private void onFollowRequestButtonClick(View v) {
itemView.setHasTransientState(true); itemView.setHasTransientState(true);
UiUtils.handleFollowRequest((Activity) v.getContext(), item.account, item.parentFragment.getAccountID(), item.notification.id , v == acceptButton, relationship, rel -> { UiUtils.handleFollowRequest((Activity) v.getContext(), item.account, item.parentFragment.getAccountID(), null, v == acceptButton, relationship, rel -> {
itemView.setHasTransientState(false); itemView.setHasTransientState(false);
item.parentFragment.putRelationship(item.account.id, rel); item.parentFragment.putRelationship(item.account.id, rel);
rebind(); RecyclerView.Adapter<? extends RecyclerView.ViewHolder> adapter = getBindingAdapter();
if (!rel.requested && !rel.followedBy && adapter != null) {
int index = item.parentFragment.getDisplayItems().indexOf(item);
item.parentFragment.getDisplayItems().remove(index);
item.parentFragment.getDisplayItems().remove(index - 1);
adapter.notifyItemRangeRemoved(getLayoutPosition()-1, 2);
} else {
rebind();
}
}); });
} }

View File

@@ -4,10 +4,15 @@ import android.app.Activity;
import android.content.Intent; import android.content.Intent;
import android.os.Build; import android.os.Build;
import android.os.Bundle; import android.os.Bundle;
import android.view.MotionEvent;
import android.view.View; import android.view.View;
import android.view.ViewConfiguration;
import android.view.ViewGroup; import android.view.ViewGroup;
import android.view.accessibility.AccessibilityNodeInfo; import android.view.accessibility.AccessibilityNodeInfo;
import android.view.animation.AlphaAnimation;
import android.view.animation.Animation;
import android.widget.Button; import android.widget.Button;
import android.widget.FrameLayout;
import android.widget.ImageView; import android.widget.ImageView;
import android.widget.TextView; import android.widget.TextView;
@@ -21,10 +26,8 @@ import org.joinmastodon.android.model.StatusPrivacy;
import org.joinmastodon.android.ui.utils.UiUtils; import org.joinmastodon.android.ui.utils.UiUtils;
import org.parceler.Parcels; import org.parceler.Parcels;
import java.text.DecimalFormat;
import me.grishka.appkit.Nav; import me.grishka.appkit.Nav;
import me.grishka.appkit.utils.BindableViewHolder; import me.grishka.appkit.utils.CubicBezierInterpolator;
import me.grishka.appkit.utils.V; import me.grishka.appkit.utils.V;
public class FooterStatusDisplayItem extends StatusDisplayItem{ public class FooterStatusDisplayItem extends StatusDisplayItem{
@@ -46,6 +49,10 @@ public class FooterStatusDisplayItem extends StatusDisplayItem{
public static class Holder extends StatusDisplayItem.Holder<FooterStatusDisplayItem>{ public static class Holder extends StatusDisplayItem.Holder<FooterStatusDisplayItem>{
private final TextView reply, boost, favorite, bookmark; private final TextView reply, boost, favorite, bookmark;
private final ImageView share; private final ImageView share;
private static final Animation opacityOut, opacityIn;
private View touchingView = null;
private final Runnable longClickRunnable = () -> { if (touchingView != null) touchingView.performLongClick(); };
private final View.AccessibilityDelegate buttonAccessibilityDelegate=new View.AccessibilityDelegate(){ private final View.AccessibilityDelegate buttonAccessibilityDelegate=new View.AccessibilityDelegate(){
@Override @Override
@@ -56,6 +63,16 @@ public class FooterStatusDisplayItem extends StatusDisplayItem{
} }
}; };
static {
opacityOut = new AlphaAnimation(1, 0.7f);
opacityOut.setDuration(200);
opacityOut.setInterpolator(CubicBezierInterpolator.DEFAULT);
opacityOut.setFillAfter(true);
opacityIn = new AlphaAnimation(0.7f, 1);
opacityIn.setDuration(300);
opacityIn.setInterpolator(CubicBezierInterpolator.DEFAULT);
}
public Holder(Activity activity, ViewGroup parent){ public Holder(Activity activity, ViewGroup parent){
super(activity, R.layout.display_item_footer, parent); super(activity, R.layout.display_item_footer, parent);
reply=findViewById(R.id.reply); reply=findViewById(R.id.reply);
@@ -74,15 +91,22 @@ public class FooterStatusDisplayItem extends StatusDisplayItem{
View favorite=findViewById(R.id.favorite_btn); View favorite=findViewById(R.id.favorite_btn);
View share=findViewById(R.id.share_btn); View share=findViewById(R.id.share_btn);
View bookmark=findViewById(R.id.bookmark_btn); View bookmark=findViewById(R.id.bookmark_btn);
reply.setOnTouchListener(this::onButtonTouch);
reply.setOnClickListener(this::onReplyClick); reply.setOnClickListener(this::onReplyClick);
reply.setAccessibilityDelegate(buttonAccessibilityDelegate); reply.setAccessibilityDelegate(buttonAccessibilityDelegate);
boost.setOnTouchListener(this::onButtonTouch);
boost.setOnClickListener(this::onBoostClick); boost.setOnClickListener(this::onBoostClick);
boost.setOnLongClickListener(this::onBoostLongClick);
boost.setAccessibilityDelegate(buttonAccessibilityDelegate); boost.setAccessibilityDelegate(buttonAccessibilityDelegate);
favorite.setOnTouchListener(this::onButtonTouch);
favorite.setOnClickListener(this::onFavoriteClick); favorite.setOnClickListener(this::onFavoriteClick);
favorite.setAccessibilityDelegate(buttonAccessibilityDelegate); favorite.setAccessibilityDelegate(buttonAccessibilityDelegate);
bookmark.setOnTouchListener(this::onButtonTouch);
bookmark.setOnClickListener(this::onBookmarkClick); bookmark.setOnClickListener(this::onBookmarkClick);
bookmark.setAccessibilityDelegate(buttonAccessibilityDelegate); bookmark.setAccessibilityDelegate(buttonAccessibilityDelegate);
share.setOnTouchListener(this::onButtonTouch);
share.setOnClickListener(this::onShareClick); share.setOnClickListener(this::onShareClick);
share.setOnLongClickListener(this::onShareLongClick);
share.setAccessibilityDelegate(buttonAccessibilityDelegate); share.setAccessibilityDelegate(buttonAccessibilityDelegate);
} }
@@ -108,7 +132,32 @@ public class FooterStatusDisplayItem extends StatusDisplayItem{
} }
} }
private boolean onButtonTouch(View v, MotionEvent event){
boolean disabled = !v.isEnabled() || (v instanceof FrameLayout parentFrame &&
parentFrame.getChildCount() > 0 && !parentFrame.getChildAt(0).isEnabled());
int action = event.getAction();
long eventDuration = event.getEventTime() - event.getDownTime();
if (action == MotionEvent.ACTION_UP || action == MotionEvent.ACTION_CANCEL) {
touchingView = null;
v.removeCallbacks(longClickRunnable);
v.animate().scaleX(1).scaleY(1).setInterpolator(CubicBezierInterpolator.DEFAULT).setDuration(150).start();
if (disabled) return true;
if (action == MotionEvent.ACTION_UP && eventDuration < ViewConfiguration.getLongPressTimeout()) v.performClick();
else v.startAnimation(opacityIn);
} else if (action == MotionEvent.ACTION_DOWN) {
touchingView = v;
// 20dp to center in middle of icon, because: (icon width = 24dp) / 2 + (paddingStart = 8dp)
v.setPivotX(V.dp(20));
v.animate().scaleX(0.85f).scaleY(0.85f).setInterpolator(CubicBezierInterpolator.DEFAULT).setDuration(75).start();
if (disabled) return true;
v.postDelayed(longClickRunnable, ViewConfiguration.getLongPressTimeout());
v.startAnimation(opacityOut);
}
return true;
}
private void onReplyClick(View v){ private void onReplyClick(View v){
v.startAnimation(opacityIn);
Bundle args=new Bundle(); Bundle args=new Bundle();
args.putString("account", item.accountID); args.putString("account", item.accountID);
args.putParcelable("replyTo", Parcels.wrap(item.status)); args.putParcelable("replyTo", Parcels.wrap(item.status));
@@ -116,29 +165,53 @@ public class FooterStatusDisplayItem extends StatusDisplayItem{
} }
private void onBoostClick(View v){ private void onBoostClick(View v){
AccountSessionManager.getInstance().getAccount(item.accountID).getStatusInteractionController().setReblogged(item.status, !item.status.reblogged); boost.setSelected(!item.status.reblogged);
boost.setSelected(item.status.reblogged); AccountSessionManager.getInstance().getAccount(item.accountID).getStatusInteractionController().setReblogged(item.status, !item.status.reblogged, r->{
bindButton(boost, item.status.reblogsCount); v.startAnimation(opacityIn);
bindButton(boost, r.reblogsCount);
});
}
private boolean onBoostLongClick(View v){
v.setAlpha(1);
v.setScaleX(1);
v.setScaleY(1);
Bundle args=new Bundle();
args.putString("account", item.accountID);
args.putString("prefilledText", "\n\n" + item.status.url);
args.putInt("selectionStart", 0);
Nav.go(item.parentFragment.getActivity(), ComposeFragment.class, args);
return true;
} }
private void onFavoriteClick(View v){ private void onFavoriteClick(View v){
AccountSessionManager.getInstance().getAccount(item.accountID).getStatusInteractionController().setFavorited(item.status, !item.status.favourited); favorite.setSelected(!item.status.favourited);
favorite.setSelected(item.status.favourited); AccountSessionManager.getInstance().getAccount(item.accountID).getStatusInteractionController().setFavorited(item.status, !item.status.favourited, r->{
bindButton(favorite, item.status.favouritesCount); v.startAnimation(opacityIn);
bindButton(favorite, r.favouritesCount);
});
} }
private void onBookmarkClick(View v){ private void onBookmarkClick(View v){
AccountSessionManager.getInstance().getAccount(item.accountID).getStatusInteractionController().setBookmarked(item.status, !item.status.bookmarked);
bookmark.setSelected(item.status.bookmarked); bookmark.setSelected(item.status.bookmarked);
AccountSessionManager.getInstance().getAccount(item.accountID).getStatusInteractionController().setBookmarked(item.status, !item.status.bookmarked, r->{
v.startAnimation(opacityIn);
});
} }
private void onShareClick(View v){ private void onShareClick(View v){
v.startAnimation(opacityIn);
Intent intent=new Intent(Intent.ACTION_SEND); Intent intent=new Intent(Intent.ACTION_SEND);
intent.setType("text/plain"); intent.setType("text/plain");
intent.putExtra(Intent.EXTRA_TEXT, item.status.url); intent.putExtra(Intent.EXTRA_TEXT, item.status.url);
v.getContext().startActivity(Intent.createChooser(intent, v.getContext().getString(R.string.share_toot_title))); v.getContext().startActivity(Intent.createChooser(intent, v.getContext().getString(R.string.share_toot_title)));
} }
private boolean onShareLongClick(View v){
UiUtils.copyText(v.getContext(), item.status.url);
return true;
}
private int descriptionForId(int id){ private int descriptionForId(int id){
if(id==R.id.reply_btn) if(id==R.id.reply_btn)
return R.string.button_reply; return R.string.button_reply;

View File

@@ -23,7 +23,6 @@ import org.joinmastodon.android.GlobalUserPreferences;
import org.joinmastodon.android.R; import org.joinmastodon.android.R;
import org.joinmastodon.android.api.requests.accounts.GetAccountRelationships; import org.joinmastodon.android.api.requests.accounts.GetAccountRelationships;
import org.joinmastodon.android.api.requests.statuses.GetStatusSourceText; import org.joinmastodon.android.api.requests.statuses.GetStatusSourceText;
import org.joinmastodon.android.api.requests.statuses.GetStatusTranslation;
import org.joinmastodon.android.api.session.AccountSessionManager; import org.joinmastodon.android.api.session.AccountSessionManager;
import org.joinmastodon.android.fragments.BaseStatusListFragment; import org.joinmastodon.android.fragments.BaseStatusListFragment;
import org.joinmastodon.android.fragments.ComposeFragment; import org.joinmastodon.android.fragments.ComposeFragment;
@@ -32,9 +31,10 @@ import org.joinmastodon.android.fragments.ThreadFragment;
import org.joinmastodon.android.fragments.report.ReportReasonChoiceFragment; import org.joinmastodon.android.fragments.report.ReportReasonChoiceFragment;
import org.joinmastodon.android.model.Account; import org.joinmastodon.android.model.Account;
import org.joinmastodon.android.model.Attachment; import org.joinmastodon.android.model.Attachment;
import org.joinmastodon.android.model.Preferences;
import org.joinmastodon.android.model.Relationship; import org.joinmastodon.android.model.Relationship;
import org.joinmastodon.android.model.Status; import org.joinmastodon.android.model.Status;
import org.joinmastodon.android.model.StatusTranslation; import org.joinmastodon.android.model.StatusPrivacy;
import org.joinmastodon.android.ui.text.HtmlParser; import org.joinmastodon.android.ui.text.HtmlParser;
import org.joinmastodon.android.ui.utils.CustomEmojiHelper; import org.joinmastodon.android.ui.utils.CustomEmojiHelper;
import org.joinmastodon.android.ui.utils.UiUtils; import org.joinmastodon.android.ui.utils.UiUtils;
@@ -43,6 +43,7 @@ import org.parceler.Parcels;
import java.time.Instant; import java.time.Instant;
import java.util.Collections; import java.util.Collections;
import java.util.List; import java.util.List;
import java.util.Objects;
import me.grishka.appkit.Nav; import me.grishka.appkit.Nav;
import me.grishka.appkit.api.APIRequest; import me.grishka.appkit.api.APIRequest;
@@ -62,7 +63,6 @@ public class HeaderStatusDisplayItem extends StatusDisplayItem{
private SpannableStringBuilder parsedName; private SpannableStringBuilder parsedName;
public final Status status; public final Status status;
private boolean hasVisibilityToggle; private boolean hasVisibilityToggle;
private boolean hasTranslateToggle;
boolean needBottomPadding; boolean needBottomPadding;
private String extraText; private String extraText;
@@ -77,7 +77,6 @@ public class HeaderStatusDisplayItem extends StatusDisplayItem{
HtmlParser.parseCustomEmoji(parsedName, user.emojis); HtmlParser.parseCustomEmoji(parsedName, user.emojis);
emojiHelper.setText(parsedName); emojiHelper.setText(parsedName);
if(status!=null){ if(status!=null){
hasTranslateToggle=true;
hasVisibilityToggle=status.sensitive || !TextUtils.isEmpty(status.spoilerText); hasVisibilityToggle=status.sensitive || !TextUtils.isEmpty(status.spoilerText);
if(!hasVisibilityToggle && !status.mediaAttachments.isEmpty()){ if(!hasVisibilityToggle && !status.mediaAttachments.isEmpty()){
for(Attachment att:status.mediaAttachments){ for(Attachment att:status.mediaAttachments){
@@ -111,7 +110,7 @@ public class HeaderStatusDisplayItem extends StatusDisplayItem{
public static class Holder extends StatusDisplayItem.Holder<HeaderStatusDisplayItem> implements ImageLoaderViewHolder{ public static class Holder extends StatusDisplayItem.Holder<HeaderStatusDisplayItem> implements ImageLoaderViewHolder{
private final TextView name, username, timestamp, extraText; private final TextView name, username, timestamp, extraText;
private final ImageView avatar, more, visibility, translate; private final ImageView avatar, more, visibility;
private final PopupMenu optionsMenu; private final PopupMenu optionsMenu;
private Relationship relationship; private Relationship relationship;
private APIRequest<?> currentRelationshipRequest; private APIRequest<?> currentRelationshipRequest;
@@ -125,7 +124,6 @@ public class HeaderStatusDisplayItem extends StatusDisplayItem{
public Holder(Activity activity, ViewGroup parent){ public Holder(Activity activity, ViewGroup parent){
super(activity, R.layout.display_item_header, parent); super(activity, R.layout.display_item_header, parent);
translate=findViewById(R.id.translate);
name=findViewById(R.id.name); name=findViewById(R.id.name);
username=findViewById(R.id.username); username=findViewById(R.id.username);
timestamp=findViewById(R.id.timestamp); timestamp=findViewById(R.id.timestamp);
@@ -138,7 +136,6 @@ public class HeaderStatusDisplayItem extends StatusDisplayItem{
avatar.setClipToOutline(true); avatar.setClipToOutline(true);
more.setOnClickListener(this::onMoreClick); more.setOnClickListener(this::onMoreClick);
visibility.setOnClickListener(v->item.parentFragment.onVisibilityIconClick(this)); visibility.setOnClickListener(v->item.parentFragment.onVisibilityIconClick(this));
translate.setOnClickListener(v->item.parentFragment.onRevealTranslationClick(this));
optionsMenu=new PopupMenu(activity, more); optionsMenu=new PopupMenu(activity, more);
optionsMenu.inflate(R.menu.post); optionsMenu.inflate(R.menu.post);
@@ -232,7 +229,6 @@ public class HeaderStatusDisplayItem extends StatusDisplayItem{
else else
timestamp.setText(item.parentFragment.getString(R.string.edited_timestamp, UiUtils.formatRelativeTimestamp(itemView.getContext(), item.status.editedAt))); timestamp.setText(item.parentFragment.getString(R.string.edited_timestamp, UiUtils.formatRelativeTimestamp(itemView.getContext(), item.status.editedAt)));
visibility.setVisibility(item.hasVisibilityToggle && !item.inset ? View.VISIBLE : View.GONE); visibility.setVisibility(item.hasVisibilityToggle && !item.inset ? View.VISIBLE : View.GONE);
translate.setVisibility(item.hasTranslateToggle ? View.VISIBLE : View.GONE);
if(item.hasVisibilityToggle){ if(item.hasVisibilityToggle){
visibility.setImageResource(item.status.spoilerRevealed ? R.drawable.ic_visibility_off : R.drawable.ic_visibility); visibility.setImageResource(item.status.spoilerRevealed ? R.drawable.ic_visibility_off : R.drawable.ic_visibility);
visibility.setContentDescription(item.parentFragment.getString(item.status.spoilerRevealed ? R.string.hide_content : R.string.reveal_content)); visibility.setContentDescription(item.parentFragment.getString(item.status.spoilerRevealed ? R.string.hide_content : R.string.reveal_content));
@@ -240,9 +236,6 @@ public class HeaderStatusDisplayItem extends StatusDisplayItem{
visibility.setTooltipText(visibility.getContentDescription()); visibility.setTooltipText(visibility.getContentDescription());
} }
} }
if(item.hasTranslateToggle){
translate.setImageResource(item.status.wantsTranslation ? R.drawable.ic_translate_on : R.drawable.ic_translate_off);
}
itemView.setPadding(itemView.getPaddingLeft(), itemView.getPaddingTop(), itemView.getPaddingRight(), item.needBottomPadding ? V.dp(16) : 0); itemView.setPadding(itemView.getPaddingLeft(), itemView.getPaddingTop(), itemView.getPaddingRight(), item.needBottomPadding ? V.dp(16) : 0);
if(TextUtils.isEmpty(item.extraText)){ if(TextUtils.isEmpty(item.extraText)){
extraText.setVisibility(View.GONE); extraText.setVisibility(View.GONE);

View File

@@ -95,7 +95,7 @@ public class LinkCardStatusDisplayItem extends StatusDisplayItem{
} }
private void onClick(View v){ private void onClick(View v){
UiUtils.launchWebBrowser(itemView.getContext(), item.status.card.url); UiUtils.openURL(itemView.getContext(), item.parentFragment.getAccountID(), item.status.card.url);
} }
} }
} }

View File

@@ -8,16 +8,20 @@ import android.text.TextUtils;
import android.util.TypedValue; import android.util.TypedValue;
import android.view.View; import android.view.View;
import android.view.ViewGroup; import android.view.ViewGroup;
import android.widget.Button;
import android.widget.LinearLayout; import android.widget.LinearLayout;
import android.widget.Button;
import android.widget.TextView; import android.widget.TextView;
import org.joinmastodon.android.R; import org.joinmastodon.android.R;
import org.joinmastodon.android.api.requests.statuses.GetStatusTranslation; import org.joinmastodon.android.api.requests.statuses.TranslateStatus;
import org.joinmastodon.android.api.session.AccountSession;
import org.joinmastodon.android.api.session.AccountSessionManager;
import org.joinmastodon.android.fragments.BaseStatusListFragment; import org.joinmastodon.android.fragments.BaseStatusListFragment;
import org.joinmastodon.android.model.Instance;
import org.joinmastodon.android.model.Status; import org.joinmastodon.android.model.Status;
import org.joinmastodon.android.model.StatusTranslation;
import org.joinmastodon.android.ui.drawables.SpoilerStripesDrawable; import org.joinmastodon.android.ui.drawables.SpoilerStripesDrawable;
import org.joinmastodon.android.model.StatusPrivacy;
import org.joinmastodon.android.model.TranslatedStatus;
import org.joinmastodon.android.ui.text.HtmlParser; import org.joinmastodon.android.ui.text.HtmlParser;
import org.joinmastodon.android.ui.utils.CustomEmojiHelper; import org.joinmastodon.android.ui.utils.CustomEmojiHelper;
import org.joinmastodon.android.ui.views.LinkedTextView; import org.joinmastodon.android.ui.views.LinkedTextView;
@@ -35,18 +39,21 @@ public class TextStatusDisplayItem extends StatusDisplayItem{
private CharSequence parsedSpoilerText; private CharSequence parsedSpoilerText;
public boolean textSelectable; public boolean textSelectable;
public final Status status; public final Status status;
public boolean translated = false;
public TranslatedStatus translation = null;
private AccountSession session;
public TextStatusDisplayItem(String parentID, CharSequence text, BaseStatusListFragment parentFragment, Status status){ public TextStatusDisplayItem(String parentID, CharSequence text, BaseStatusListFragment parentFragment, Status status){
super(parentID, parentFragment); super(parentID, parentFragment);
this.text=text; this.text=text;
this.status=status; this.status=status;
// this.wantsTranslation=wantsTranslation;
emojiHelper.setText(text); emojiHelper.setText(text);
if(!TextUtils.isEmpty(status.spoilerText)){ if(!TextUtils.isEmpty(status.spoilerText)){
parsedSpoilerText=HtmlParser.parseCustomEmoji(status.spoilerText, status.emojis); parsedSpoilerText=HtmlParser.parseCustomEmoji(status.spoilerText, status.emojis);
spoilerEmojiHelper=new CustomEmojiHelper(); spoilerEmojiHelper=new CustomEmojiHelper();
spoilerEmojiHelper.setText(parsedSpoilerText); spoilerEmojiHelper.setText(parsedSpoilerText);
} }
session = AccountSessionManager.getInstance().getAccount(parentFragment.getAccountID());
} }
@Override @Override
@@ -71,9 +78,10 @@ public class TextStatusDisplayItem extends StatusDisplayItem{
public static class Holder extends StatusDisplayItem.Holder<TextStatusDisplayItem> implements ImageLoaderViewHolder{ public static class Holder extends StatusDisplayItem.Holder<TextStatusDisplayItem> implements ImageLoaderViewHolder{
private final LinkedTextView text; private final LinkedTextView text;
private final LinearLayout spoilerHeader; private final LinearLayout spoilerHeader;
private final TextView spoilerTitle, spoilerTitleInline; private final TextView spoilerTitle, spoilerTitleInline, translateInfo;
private final View spoilerOverlay, borderTop, borderBottom; private final View spoilerOverlay, borderTop, borderBottom, textWrap, translateWrap, translateProgress;
private final Drawable backgroundColor, borderColor; private final Drawable backgroundColor, borderColor;
private final Button translateButton;
public Holder(Activity activity, ViewGroup parent){ public Holder(Activity activity, ViewGroup parent){
super(activity, R.layout.display_item_text, parent); super(activity, R.layout.display_item_text, parent);
@@ -84,6 +92,11 @@ public class TextStatusDisplayItem extends StatusDisplayItem{
spoilerOverlay=findViewById(R.id.spoiler_overlay); spoilerOverlay=findViewById(R.id.spoiler_overlay);
borderTop=findViewById(R.id.border_top); borderTop=findViewById(R.id.border_top);
borderBottom=findViewById(R.id.border_bottom); borderBottom=findViewById(R.id.border_bottom);
textWrap=findViewById(R.id.text_wrap);
translateWrap=findViewById(R.id.translate_wrap);
translateButton=findViewById(R.id.translate_btn);
translateInfo=findViewById(R.id.translate_info);
translateProgress=findViewById(R.id.translate_progress);
itemView.setOnClickListener(v->item.parentFragment.onRevealSpoilerClick(this)); itemView.setOnClickListener(v->item.parentFragment.onRevealSpoilerClick(this));
TypedValue outValue=new TypedValue(); TypedValue outValue=new TypedValue();
@@ -97,26 +110,9 @@ public class TextStatusDisplayItem extends StatusDisplayItem{
@Override @Override
public void onBind(TextStatusDisplayItem item){ public void onBind(TextStatusDisplayItem item){
if(item.status.wantsTranslation){ text.setText(item.translated
new GetStatusTranslation(item.status.id) ? HtmlParser.parse(item.translation.content, item.status.emojis, item.status.mentions, item.status.tags, item.parentFragment.getAccountID())
.setCallback(new Callback<StatusTranslation>(){ : item.text);
@Override
public void onSuccess(StatusTranslation status){
text.setText(status.getStrippedText());
}
@Override
public void onError(ErrorResponse error){
item.status.wantsTranslation=false;
text.setText(item.text);
error.showToast(item.parentFragment.getActivity());
}
})
.wrapProgress(item.parentFragment.getActivity(), R.string.loading, true)
.exec(item.parentFragment.getAccountID());
}else{
text.setText(item.text);
}
text.setTextIsSelectable(item.textSelectable); text.setTextIsSelectable(item.textSelectable);
spoilerTitleInline.setTextIsSelectable(item.textSelectable); spoilerTitleInline.setTextIsSelectable(item.textSelectable);
text.setInvalidateOnEveryFrame(false); text.setInvalidateOnEveryFrame(false);
@@ -130,20 +126,60 @@ public class TextStatusDisplayItem extends StatusDisplayItem{
if(item.status.spoilerRevealed){ if(item.status.spoilerRevealed){
spoilerOverlay.setVisibility(View.GONE); spoilerOverlay.setVisibility(View.GONE);
spoilerHeader.setVisibility(View.VISIBLE); spoilerHeader.setVisibility(View.VISIBLE);
text.setVisibility(View.VISIBLE); textWrap.setVisibility(View.VISIBLE);
itemView.setClickable(false); itemView.setClickable(false);
}else{ }else{
spoilerOverlay.setVisibility(View.VISIBLE); spoilerOverlay.setVisibility(View.VISIBLE);
spoilerHeader.setVisibility(View.GONE); spoilerHeader.setVisibility(View.GONE);
text.setVisibility(View.GONE); textWrap.setVisibility(View.GONE);
itemView.setClickable(true); itemView.setClickable(true);
} }
}else{ }else{
spoilerOverlay.setVisibility(View.GONE); spoilerOverlay.setVisibility(View.GONE);
spoilerHeader.setVisibility(View.GONE); spoilerHeader.setVisibility(View.GONE);
text.setVisibility(View.VISIBLE); textWrap.setVisibility(View.VISIBLE);
itemView.setClickable(false); itemView.setClickable(false);
} }
Instance instanceInfo = AccountSessionManager.getInstance().getInstanceInfo(item.session.domain);
boolean translateEnabled = instanceInfo.v2 != null && instanceInfo.v2.configuration.translation != null && instanceInfo.v2.configuration.translation.enabled;
translateWrap.setVisibility(translateEnabled &&
!item.status.visibility.isLessVisibleThan(StatusPrivacy.UNLISTED) &&
item.status.language != null &&
(item.session.preferences == null || !item.status.language.equalsIgnoreCase(item.session.preferences.postingDefaultLanguage))
? View.VISIBLE : View.GONE);
translateButton.setText(item.translated ? R.string.sk_translate_show_original : R.string.sk_translate_post);
translateInfo.setText(item.translated ? itemView.getResources().getString(R.string.sk_translated_using, item.translation.provider) : "");
translateButton.setOnClickListener(v->{
if (item.translation == null) {
translateProgress.setVisibility(View.VISIBLE);
translateButton.setClickable(false);
translateButton.setAlpha(.50f);
new TranslateStatus(item.status.id).setCallback(new Callback<>() {
@Override
public void onSuccess(TranslatedStatus translatedStatus) {
item.translation = translatedStatus;
item.translated = true;
translateProgress.setVisibility(View.GONE);
translateButton.setClickable(true);
translateButton.setAlpha(1f);
rebind();
}
@Override
public void onError(ErrorResponse error) {
translateProgress.setVisibility(View.GONE);
translateButton.setClickable(true);
translateButton.setAlpha(1f);
error.showToast(itemView.getContext());
}
}).exec(item.parentFragment.getAccountID());
} else {
item.translated = !item.translated;
rebind();
}
});
} }
@Override @Override

View File

@@ -182,7 +182,7 @@ public class HtmlParser{
ssb.append("", new DeleteWhenCopiedSpan(), Spanned.SPAN_EXCLUSIVE_EXCLUSIVE); ssb.append("", new DeleteWhenCopiedSpan(), Spanned.SPAN_EXCLUSIVE_EXCLUSIVE);
}else if(blockElements.contains(el.nodeName()) && node.nextSibling()!=null){ }else if(blockElements.contains(el.nodeName()) && node.nextSibling()!=null){
ssb.append("\n"); // line end ssb.append("\n"); // line end
ssb.append("\n", new RelativeSizeSpan(0.75f), Spanned.SPAN_EXCLUSIVE_EXCLUSIVE); // margin after block ssb.append("\n", new RelativeSizeSpan(0.65f), Spanned.SPAN_EXCLUSIVE_EXCLUSIVE); // margin after block
} }
} }
} }

View File

@@ -0,0 +1,69 @@
package org.joinmastodon.android.ui.utils;
import static org.joinmastodon.android.GlobalUserPreferences.ColorPreference;
import static org.joinmastodon.android.GlobalUserPreferences.ThemePreference;
import static org.joinmastodon.android.GlobalUserPreferences.theme;
import static org.joinmastodon.android.GlobalUserPreferences.trueBlackTheme;
import android.content.Context;
import android.content.res.Resources;
import androidx.annotation.StyleRes;
import org.joinmastodon.android.GlobalUserPreferences;
import org.joinmastodon.android.R;
import java.util.Map;
public class ColorPalette {
public static final Map<GlobalUserPreferences.ColorPreference, ColorPalette> palettes = Map.of(
ColorPreference.MATERIAL3, new ColorPalette(R.style.ColorPalette_Material3)
.dark(R.style.ColorPalette_Material3_Dark, R.style.ColorPalette_Material3_AutoLightDark),
ColorPreference.PINK, new ColorPalette(R.style.ColorPalette_Pink),
ColorPreference.PURPLE, new ColorPalette(R.style.ColorPalette_Purple),
ColorPreference.GREEN, new ColorPalette(R.style.ColorPalette_Green),
ColorPreference.BLUE, new ColorPalette(R.style.ColorPalette_Blue),
ColorPreference.BROWN, new ColorPalette(R.style.ColorPalette_Brown),
ColorPreference.RED, new ColorPalette(R.style.ColorPalette_Red),
ColorPreference.YELLOW, new ColorPalette(R.style.ColorPalette_Yellow),
ColorPreference.NORD, new ColorPalette(R.style.ColorPalette_Nord)
);
private @StyleRes int base;
private @StyleRes int autoDark;
private @StyleRes int light;
private @StyleRes int dark;
private @StyleRes int black;
private @StyleRes int autoBlack;
public ColorPalette(@StyleRes int baseRes) { base = baseRes; }
public ColorPalette(@StyleRes int lightRes, @StyleRes int darkRes, @StyleRes int autoDarkRes, @StyleRes int blackRes, @StyleRes int autoBlackRes) {
light = lightRes;
dark = darkRes;
autoDark = autoDarkRes;
black = blackRes;
autoBlack = autoBlackRes;
}
public ColorPalette light(@StyleRes int res) { light = res; return this; }
public ColorPalette dark(@StyleRes int res, @StyleRes int auto) { dark = res; autoDark = auto; return this; }
public ColorPalette black(@StyleRes int res, @StyleRes int auto) { dark = res; autoBlack = auto; return this; }
public void apply(Context context) {
if (!((dark != 0 && autoDark != 0) || (black != 0 && autoBlack != 0) || light != 0 || base != 0)) {
throw new IllegalStateException("Invalid color scheme definition");
}
Resources.Theme t = context.getTheme();
if (base != 0) t.applyStyle(base, true);
if (light != 0 && theme.equals(ThemePreference.LIGHT)) t.applyStyle(light, true);
else if (theme.equals(ThemePreference.DARK)) {
if (dark != 0 && !trueBlackTheme) t.applyStyle(dark, true);
else if (black != 0 && trueBlackTheme) t.applyStyle(black, true);
} else if (theme.equals(ThemePreference.AUTO)) {
if (autoDark != 0 && !trueBlackTheme) t.applyStyle(autoDark, true);
else if (autoBlack != 0 && trueBlackTheme) t.applyStyle(autoBlack, true);
}
}
}

View File

@@ -1,9 +1,16 @@
package org.joinmastodon.android.ui.utils; package org.joinmastodon.android.ui.utils;
import static org.joinmastodon.android.GlobalUserPreferences.theme;
import static org.joinmastodon.android.GlobalUserPreferences.trueBlackTheme;
import android.annotation.SuppressLint; import android.annotation.SuppressLint;
import android.app.Activity; import android.app.Activity;
import android.app.ProgressDialog;
import android.content.ActivityNotFoundException; import android.content.ActivityNotFoundException;
import android.content.ClipData;
import android.content.ClipboardManager;
import android.content.Context; import android.content.Context;
import android.content.DialogInterface;
import android.content.Intent; import android.content.Intent;
import android.content.res.ColorStateList; import android.content.res.ColorStateList;
import android.content.res.Configuration; import android.content.res.Configuration;
@@ -11,6 +18,7 @@ import android.content.res.TypedArray;
import android.database.Cursor; import android.database.Cursor;
import android.graphics.Bitmap; import android.graphics.Bitmap;
import android.graphics.Canvas; import android.graphics.Canvas;
import android.graphics.Typeface;
import android.graphics.drawable.BitmapDrawable; import android.graphics.drawable.BitmapDrawable;
import android.graphics.drawable.Drawable; import android.graphics.drawable.Drawable;
import android.graphics.drawable.InsetDrawable; import android.graphics.drawable.InsetDrawable;
@@ -19,10 +27,12 @@ import android.os.Build;
import android.os.Bundle; import android.os.Bundle;
import android.os.Handler; import android.os.Handler;
import android.os.Looper; import android.os.Looper;
import android.os.VibrationEffect;
import android.os.Vibrator;
import android.provider.OpenableColumns; import android.provider.OpenableColumns;
import android.provider.Settings;
import android.text.SpannableStringBuilder; import android.text.SpannableStringBuilder;
import android.text.Spanned; import android.text.Spanned;
import android.text.TextUtils;
import android.view.Menu; import android.view.Menu;
import android.view.MenuItem; import android.view.MenuItem;
import android.view.View; import android.view.View;
@@ -42,6 +52,7 @@ import org.joinmastodon.android.api.requests.accounts.SetAccountMuted;
import org.joinmastodon.android.api.requests.accounts.SetDomainBlocked; import org.joinmastodon.android.api.requests.accounts.SetDomainBlocked;
import org.joinmastodon.android.api.requests.accounts.AuthorizeFollowRequest; import org.joinmastodon.android.api.requests.accounts.AuthorizeFollowRequest;
import org.joinmastodon.android.api.requests.accounts.RejectFollowRequest; import org.joinmastodon.android.api.requests.accounts.RejectFollowRequest;
import org.joinmastodon.android.api.requests.search.GetSearchResults;
import org.joinmastodon.android.api.requests.statuses.DeleteStatus; import org.joinmastodon.android.api.requests.statuses.DeleteStatus;
import org.joinmastodon.android.api.requests.statuses.GetStatusByID; import org.joinmastodon.android.api.requests.statuses.GetStatusByID;
import org.joinmastodon.android.api.requests.statuses.SetStatusPinned; import org.joinmastodon.android.api.requests.statuses.SetStatusPinned;
@@ -52,8 +63,6 @@ import org.joinmastodon.android.events.NotificationDeletedEvent;
import org.joinmastodon.android.events.RemoveAccountPostsEvent; import org.joinmastodon.android.events.RemoveAccountPostsEvent;
import org.joinmastodon.android.events.StatusDeletedEvent; import org.joinmastodon.android.events.StatusDeletedEvent;
import org.joinmastodon.android.events.StatusUnpinnedEvent; import org.joinmastodon.android.events.StatusUnpinnedEvent;
import org.joinmastodon.android.fragments.BaseStatusListFragment;
import org.joinmastodon.android.fragments.ComposeFragment;
import org.joinmastodon.android.fragments.HashtagTimelineFragment; import org.joinmastodon.android.fragments.HashtagTimelineFragment;
import org.joinmastodon.android.fragments.ListTimelineFragment; import org.joinmastodon.android.fragments.ListTimelineFragment;
import org.joinmastodon.android.fragments.ProfileFragment; import org.joinmastodon.android.fragments.ProfileFragment;
@@ -62,6 +71,7 @@ import org.joinmastodon.android.model.Account;
import org.joinmastodon.android.model.Emoji; import org.joinmastodon.android.model.Emoji;
import org.joinmastodon.android.model.ListTimeline; import org.joinmastodon.android.model.ListTimeline;
import org.joinmastodon.android.model.Relationship; import org.joinmastodon.android.model.Relationship;
import org.joinmastodon.android.model.SearchResults;
import org.joinmastodon.android.model.Status; import org.joinmastodon.android.model.Status;
import org.joinmastodon.android.ui.M3AlertDialogBuilder; import org.joinmastodon.android.ui.M3AlertDialogBuilder;
import org.joinmastodon.android.ui.text.CustomEmojiSpan; import org.joinmastodon.android.ui.text.CustomEmojiSpan;
@@ -70,6 +80,8 @@ import org.parceler.Parcels;
import java.io.File; import java.io.File;
import java.lang.reflect.Method; import java.lang.reflect.Method;
import java.net.URI;
import java.net.URISyntaxException;
import java.time.Instant; import java.time.Instant;
import java.time.ZoneId; import java.time.ZoneId;
import java.time.ZonedDateTime; import java.time.ZonedDateTime;
@@ -656,93 +668,76 @@ public class UiUtils{
} }
public static void setUserPreferredTheme(Context context){ public static void setUserPreferredTheme(Context context){
// boolean isDarkTheme = isDarkTheme(); context.setTheme(switch (theme) {
switch(GlobalUserPreferences.color){ case LIGHT -> R.style.Theme_Mastodon_Light;
case PINK: case DARK -> trueBlackTheme ? R.style.Theme_Mastodon_Dark_TrueBlack : R.style.Theme_Mastodon_Dark;
context.setTheme(switch(GlobalUserPreferences.theme){ default -> trueBlackTheme ? R.style.Theme_Mastodon_AutoLightDark_TrueBlack : R.style.Theme_Mastodon_AutoLightDark;
case AUTO -> });
GlobalUserPreferences.trueBlackTheme ? R.style.Theme_Mastodon_AutoLightDark_TrueBlack : R.style.Theme_Mastodon_AutoLightDark;
case LIGHT ->
R.style.Theme_Mastodon_Light;
case DARK ->
GlobalUserPreferences.trueBlackTheme ? R.style.Theme_Mastodon_Dark_TrueBlack : R.style.Theme_Mastodon_Dark;
});
break;
case PURPLE:
context.setTheme(switch(GlobalUserPreferences.theme){
case AUTO ->
GlobalUserPreferences.trueBlackTheme ? R.style.Theme_Mastodon_AutoLightDark_TrueBlack_Original : R.style.Theme_Mastodon_AutoLightDark_Original;
case LIGHT ->
R.style.Theme_Mastodon_Light_Original;
case DARK ->
GlobalUserPreferences.trueBlackTheme ? R.style.Theme_Mastodon_Dark_TrueBlack_Original : R.style.Theme_Mastodon_Dark_Original;
});
break;
case GREEN:
context.setTheme(switch(GlobalUserPreferences.theme){
case AUTO ->
GlobalUserPreferences.trueBlackTheme ? R.style.Theme_Mastodon_AutoLightDark_TrueBlack_Green : R.style.Theme_Mastodon_AutoLightDark_Green;
case LIGHT ->
R.style.Theme_Mastodon_Light_Green;
case DARK ->
GlobalUserPreferences.trueBlackTheme ? R.style.Theme_Mastodon_Dark_TrueBlack_Green : R.style.Theme_Mastodon_Dark_Green;
});
break;
case BLUE:
context.setTheme(switch(GlobalUserPreferences.theme){
case AUTO ->
GlobalUserPreferences.trueBlackTheme ? R.style.Theme_Mastodon_AutoLightDark_TrueBlack_Blue : R.style.Theme_Mastodon_AutoLightDark_Blue;
case LIGHT ->
R.style.Theme_Mastodon_Light_Blue;
case DARK ->
GlobalUserPreferences.trueBlackTheme ? R.style.Theme_Mastodon_Dark_TrueBlack_Blue : R.style.Theme_Mastodon_Dark_Blue;
});
break;
case ORANGE:
context.setTheme(switch(GlobalUserPreferences.theme){
case AUTO ->
GlobalUserPreferences.trueBlackTheme ? R.style.Theme_Mastodon_AutoLightDark_TrueBlack_Orange : R.style.Theme_Mastodon_AutoLightDark_Orange;
case LIGHT ->
R.style.Theme_Mastodon_Light_Orange;
case DARK ->
GlobalUserPreferences.trueBlackTheme ? R.style.Theme_Mastodon_Dark_TrueBlack_Orange : R.style.Theme_Mastodon_Dark_Orange;
});
break;
case YELLOW:
context.setTheme(switch(GlobalUserPreferences.theme){
case AUTO ->
GlobalUserPreferences.trueBlackTheme ? R.style.Theme_Mastodon_AutoLightDark_TrueBlack_Yellow : R.style.Theme_Mastodon_AutoLightDark_Yellow;
case LIGHT ->
R.style.Theme_Mastodon_Light_Yellow;
case DARK ->
GlobalUserPreferences.trueBlackTheme ? R.style.Theme_Mastodon_Dark_TrueBlack_Yellow : R.style.Theme_Mastodon_Dark_Yellow;
});
break;
case MATERIAL3:
context.setTheme(switch(GlobalUserPreferences.theme){
case AUTO ->
GlobalUserPreferences.trueBlackTheme ? R.style.Theme_Mastodon_AutoLightDark_TrueBlack_Material3 : R.style.Theme_Mastodon_AutoLightDark_Material3;
case LIGHT ->
R.style.Theme_Mastodon_Light_Material3;
case DARK ->
GlobalUserPreferences.trueBlackTheme ? R.style.Theme_Mastodon_Dark_TrueBlack_Material3 : R.style.Theme_Mastodon_Dark_Material3;
});
break;
}
ColorPalette palette = ColorPalette.palettes.get(GlobalUserPreferences.color);
if (palette != null) palette.apply(context);
} }
public static boolean isDarkTheme(){ public static boolean isDarkTheme(){
if(GlobalUserPreferences.theme==GlobalUserPreferences.ThemePreference.AUTO) if(theme==GlobalUserPreferences.ThemePreference.AUTO)
return (MastodonApp.context.getResources().getConfiguration().uiMode & Configuration.UI_MODE_NIGHT_MASK)==Configuration.UI_MODE_NIGHT_YES; return (MastodonApp.context.getResources().getConfiguration().uiMode & Configuration.UI_MODE_NIGHT_MASK)==Configuration.UI_MODE_NIGHT_YES;
return GlobalUserPreferences.theme==GlobalUserPreferences.ThemePreference.DARK; return theme==GlobalUserPreferences.ThemePreference.DARK;
} }
public static void openURL(Context context, @Nullable String accountID, String url){ // https://mastodon.foo.bar/@User
// https://mastodon.foo.bar/@User/43456787654678
// https://pleroma.foo.bar/users/User
// https://pleroma.foo.bar/users/9qTHT2ANWUdXzENqC0
// https://pleroma.foo.bar/notice/9sBHWIlwwGZi5QGlHc
// https://pleroma.foo.bar/objects/d4643c42-3ae0-4b73-b8b0-c725f5819207
// https://friendica.foo.bar/profile/user
// https://friendica.foo.bar/display/d4643c42-3ae0-4b73-b8b0-c725f5819207
// https://misskey.foo.bar/notes/83w6r388br (always lowercase)
// https://pixelfed.social/p/connyduck/391263492998670833
// https://pixelfed.social/connyduck
// https://gts.foo.bar/@goblin/statuses/01GH9XANCJ0TA8Y95VE9H3Y0Q2
// https://gts.foo.bar/@goblin
// https://foo.microblog.pub/o/5b64045effd24f48a27d7059f6cb38f5
//
// COPIED FROM https://github.com/tuskyapp/Tusky/blob/develop/app/src/main/java/com/keylesspalace/tusky/util/LinkHelper.kt
public static boolean looksLikeMastodonUrl(String urlString) {
URI uri;
try {
uri = new URI(urlString);
} catch (URISyntaxException e) {
return false;
}
if (uri.getQuery() != null || uri.getFragment() != null || uri.getPath() == null) return false;
String it = uri.getPath();
return it.matches("^/@[^/]+$") ||
it.matches("^/@[^/]+/\\d+$") ||
it.matches("^/users/\\w+$") ||
it.matches("^/notice/[a-zA-Z0-9]+$") ||
it.matches("^/objects/[-a-f0-9]+$") ||
it.matches("^/notes/[a-z0-9]+$") ||
it.matches("^/display/[-a-f0-9]+$") ||
it.matches("^/profile/\\w+$") ||
it.matches("^/p/\\w+/\\d+$") ||
it.matches("^/\\w+$") ||
it.matches("^/@[^/]+/statuses/[a-zA-Z0-9]+$") ||
it.matches("^/o/[a-f0-9]+$");
}
public static void openURL(Context context, String accountID, String url){
Consumer<ProgressDialog> transformDialogForLookup = dialog -> {
dialog.setTitle(R.string.loading_fediverse_resource_title);
dialog.setButton(DialogInterface.BUTTON_NEGATIVE, context.getString(R.string.cancel), (d, which) -> d.cancel());
dialog.setButton(DialogInterface.BUTTON_POSITIVE, context.getString(R.string.open_in_browser), (d, which) -> {
d.cancel();
launchWebBrowser(context, url);
});
};
Uri uri=Uri.parse(url); Uri uri=Uri.parse(url);
if(accountID!=null && "https".equals(uri.getScheme()) && AccountSessionManager.getInstance().getAccount(accountID).domain.equalsIgnoreCase(uri.getAuthority())){ List<String> path=uri.getPathSegments();
List<String> path=uri.getPathSegments(); if(accountID!=null && "https".equals(uri.getScheme())){
// Match URLs like https://mastodon.social/@Gargron/108132679274083591 if(path.size()==2 && path.get(0).matches("^@[a-zA-Z0-9_]+$") && path.get(1).matches("^[0-9]+$") && AccountSessionManager.getInstance().getAccount(accountID).domain.equalsIgnoreCase(uri.getAuthority())){
if(path.size()==2 && path.get(0).matches("^@[a-zA-Z0-9_]+$") && path.get(1).matches("^[0-9]+$")){
new GetStatusByID(path.get(1)) new GetStatusByID(path.get(1))
.setCallback(new Callback<>(){ .setCallback(new Callback<>(){
@Override @Override
@@ -759,11 +754,61 @@ public class UiUtils{
launchWebBrowser(context, url); launchWebBrowser(context, url);
} }
}) })
.wrapProgress((Activity)context, R.string.loading, true) .wrapProgress((Activity)context, R.string.loading, true, transformDialogForLookup)
.exec(accountID);
return;
} else if (looksLikeMastodonUrl(url)) {
new GetSearchResults(url, null, true)
.setCallback(new Callback<>() {
@Override
public void onSuccess(SearchResults results) {
Bundle args=new Bundle();
args.putString("account", accountID);
if (!results.statuses.isEmpty()) {
args.putParcelable("status", Parcels.wrap(results.statuses.get(0)));
Nav.go((Activity) context, ThreadFragment.class, args);
} else if (!results.accounts.isEmpty()) {
args.putParcelable("profileAccount", Parcels.wrap(results.accounts.get(0)));
Nav.go((Activity) context, ProfileFragment.class, args);
} else {
launchWebBrowser(context, url);
}
}
@Override
public void onError(ErrorResponse error) {
error.showToast(context);
launchWebBrowser(context, url);
}
})
.wrapProgress((Activity)context, R.string.loading, true, transformDialogForLookup)
.exec(accountID); .exec(accountID);
return; return;
} }
} }
launchWebBrowser(context, url); launchWebBrowser(context, url);
} }
public static void copyText(Context context, String text) {
context.getSystemService(ClipboardManager.class).setPrimaryClip(ClipData.newPlainText(null, text));
if(Build.VERSION.SDK_INT<Build.VERSION_CODES.TIRAMISU || UiUtils.isMIUI()){ // Android 13+ SystemUI shows its own thing when you put things into the clipboard
Toast.makeText(context, R.string.text_copied, Toast.LENGTH_SHORT).show();
}
Vibrator vibrator = (Vibrator) context.getSystemService(Context.VIBRATOR_SERVICE);
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) vibrator.vibrate(VibrationEffect.createOneShot(50, VibrationEffect.DEFAULT_AMPLITUDE));
else vibrator.vibrate(50);
}
private static String getSystemProperty(String key){
try{
Class<?> props=Class.forName("android.os.SystemProperties");
Method get=props.getMethod("get", String.class);
return (String)get.invoke(null, key);
}catch(Exception ignore){}
return null;
}
public static boolean isMIUI(){
return !TextUtils.isEmpty(getSystemProperty("ro.miui.ui.version.code"));
}
} }

View File

@@ -50,6 +50,7 @@ public abstract class GithubSelfUpdater{
} }
public static class UpdateInfo{ public static class UpdateInfo{
public String changelog;
public String version; public String version;
public long size; public long size;
} }

View File

@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android"> <selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:color="@color/bookmark_selected" android:state_selected="true"/> <item android:color="?bookmark_selected" android:state_selected="true"/>
<item android:color="?android:textColorSecondary"/> <item android:color="?android:textColorSecondary"/>
</selector> </selector>

View File

@@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android"> <selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:color="?colorSecondary"/> <item android:color="?colorGray50"/>
</selector> </selector>

View File

@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android"> <selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:color="@color/favorite_selected" android:state_selected="true"/> <item android:color="?favorite_selected" android:state_selected="true"/>
<item android:color="?android:textColorSecondary"/> <item android:color="?android:textColorSecondary"/>
</selector> </selector>

View File

@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:color="?android:colorAccent" android:state_selected="true"/>
<item android:color="?android:textColorSecondary" android:state_enabled="true"/>
<item android:color="?colorSecondary"/>
</selector>

View File

@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"> <shape xmlns:android="http://schemas.android.com/apk/res/android">
<solid android:color="?colorWindowBackground"/> <solid android:color="?colorGray800"/>
<corners android:radius="10dp"/> <corners android:radius="10dp"/>
<padding android:top="16dp" android:left="16dp" android:right="16dp" android:bottom="16dp"/> <padding android:top="16dp" android:left="16dp" android:right="16dp" android:bottom="16dp"/>
</shape> </shape>

View File

@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"> <shape xmlns:android="http://schemas.android.com/apk/res/android">
<solid android:color="@color/gray_25"/> <solid android:color="?colorGray25"/>
<corners android:radius="10dp"/> <corners android:radius="10dp"/>
<padding android:top="16dp" android:left="16dp" android:right="16dp" android:bottom="16dp"/> <padding android:top="16dp" android:left="16dp" android:right="16dp" android:bottom="16dp"/>
</shape> </shape>

View File

@@ -2,7 +2,7 @@
<ripple xmlns:android="http://schemas.android.com/apk/res/android" android:color="@color/highlight_over_dark"> <ripple xmlns:android="http://schemas.android.com/apk/res/android" android:color="@color/highlight_over_dark">
<item> <item>
<shape android:shape="oval"> <shape android:shape="oval">
<solid android:color="?colorSearchHint"/> <solid android:color="?colorGray600"/>
</shape> </shape>
</item> </item>
</ripple> </ripple>

View File

@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<layer-list xmlns:android="http://schemas.android.com/apk/res/android"> <layer-list xmlns:android="http://schemas.android.com/apk/res/android">
<item> <item>
<shape android:tint="@color/gray_800"> <shape android:tint="?colorGray800">
<solid android:color="#CC000000"/> <solid android:color="#CC000000"/>
</shape> </shape>
</item> </item>

View File

@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android"> <selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:state_selected="true" android:drawable="@drawable/ic_fluent_arrow_repeat_all_24_filled"/> <item android:state_selected="true" android:drawable="@drawable/ic_fluent_arrow_repeat_all_24_very_filled"/>
<item android:state_enabled="true" android:drawable="@drawable/ic_fluent_arrow_repeat_all_24_regular"/> <item android:state_enabled="true" android:drawable="@drawable/ic_fluent_arrow_repeat_all_24_regular"/>
<item android:drawable="@drawable/ic_fluent_arrow_repeat_all_off_24_regular"/> <item android:drawable="@drawable/ic_fluent_arrow_repeat_all_off_24_regular"/>
</selector> </selector>

View File

@@ -1,23 +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:fillColor="#FF000000"
android:pathData="M12,22C6.49,22 2,17.51 2,12S6.49,2 12,2s10,4.04 10,9c0,3.31 -2.69,6 -6,6h-1.77c-0.28,0 -0.5,0.22 -0.5,0.5 0,0.12 0.05,0.23 0.13,0.33 0.41,0.47 0.64,1.06 0.64,1.67 0,1.38 -1.12,2.5 -2.5,2.5zM12,4c-4.41,0 -8,3.59 -8,8s3.59,8 8,8c0.28,0 0.5,-0.22 0.5,-0.5 0,-0.16 -0.08,-0.28 -0.14,-0.35 -0.41,-0.46 -0.63,-1.05 -0.63,-1.65 0,-1.38 1.12,-2.5 2.5,-2.5L16,15c2.21,0 4,-1.79 4,-4 0,-3.86 -3.59,-7 -8,-7z"/>
<path
android:fillColor="#FF000000"
android:pathData="M6.5,11.5m-1.5,0a1.5,1.5 0,1 1,3 0a1.5,1.5 0,1 1,-3 0"/>
<path
android:fillColor="#FF000000"
android:pathData="M9.5,7.5m-1.5,0a1.5,1.5 0,1 1,3 0a1.5,1.5 0,1 1,-3 0"/>
<path
android:fillColor="#FF000000"
android:pathData="M14.5,7.5m-1.5,0a1.5,1.5 0,1 1,3 0a1.5,1.5 0,1 1,-3 0"/>
<path
android:fillColor="#FF000000"
android:pathData="M17.5,11.5m-1.5,0a1.5,1.5 0,1 1,3 0a1.5,1.5 0,1 1,-3 0"/>
</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="M13.22 17.219c-0.267 0.266-0.29 0.683-0.073 0.976l0.073 0.084 2.367 2.37C15.713 20.859 15.963 21 16.251 21c0.252 0 0.475-0.109 0.611-0.276l0.053-0.075 2.367-2.37 0.073-0.084c0.193-0.26 0.196-0.619 0.007-0.882l-0.08-0.094-0.084-0.073c-0.261-0.193-0.62-0.196-0.883-0.007l-0.094 0.08L17 18.44V3.656l-0.007-0.089C16.943 3.247 16.63 3 16.25 3s-0.694 0.247-0.743 0.567L15.5 3.657V18.44l-1.22-1.221-0.084-0.073c-0.293-0.218-0.71-0.193-0.976 0.073zm-6.97 2.789C5.007 20.008 4 19 4 17.758v-11.5c0-1.243 1.007-2.25 2.25-2.25h6c0.414 0 0.75 0.336 0.75 0.75s-0.336 0.75-0.75 0.75h-6c-0.414 0-0.75 0.336-0.75 0.75v11.5c0 0.414 0.336 0.75 0.75 0.75h4c0.414 0 0.75 0.336 0.75 0.75s-0.336 0.75-0.75 0.75h-4z" 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="24dp" android:height="24dp" android:viewportWidth="24" android:viewportHeight="24">
<path android:pathData="M7.47 12.28l0.084 0.073c0.294 0.218 0.71 0.193 0.977-0.073l2.72-2.72v6.69l0.007 0.102C11.308 16.718 11.62 17 12 17l0.101-0.006c0.367-0.05 0.649-0.364 0.649-0.744V9.56l2.72 2.722 0.084 0.072c0.294 0.218 0.71 0.194 0.977-0.072 0.293-0.293 0.293-0.768 0-1.06l-4-4.002-0.084-0.073c-0.294-0.218-0.71-0.194-0.977 0.073l-4 4-0.073 0.085c-0.218 0.293-0.194 0.71 0.072 0.976zM22.001 12c0-5.523-4.477-10-10-10s-10 4.477-10 10 4.477 10 10 10 10-4.477 10-10zm-18.5 0c0-4.694 3.806-8.5 8.5-8.5s8.5 3.806 8.5 8.5-3.806 8.5-8.5 8.5-8.5-3.806-8.5-8.5z" android:fillColor="@color/fluent_default_icon_tint"/>
</vector>

View File

@@ -0,0 +1,23 @@
<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,9.123C7.423,9.123 6.125,10.421 6.125,11.994C6.125,12.523 6.269,13.014 6.514,13.434C6.514,13.435 6.513,13.436 6.514,13.438L6.619,13.607L6.623,13.613C6.666,13.679 6.706,13.747 6.744,13.816L7.787,12.775C9.015,11.549 10.977,11.548 12.205,12.775C12.789,13.359 13.077,14.104 13.105,14.863L15.002,14.863C16.579,14.863 17.875,13.567 17.875,11.992C17.875,11.463 17.731,10.972 17.486,10.553L17.486,10.549L17.381,10.379C17.337,10.311 17.295,10.241 17.256,10.17L16.215,11.211C14.986,12.439 13.025,12.44 11.797,11.213C11.218,10.634 10.931,9.885 10.902,9.123L9,9.123z"
android:strokeWidth="3"
android:fillColor="#212121"/>
<path
android:pathData="M20.787,8.06C20.603,7.828 20.319,7.678 20,7.678c-0.552,0 -1,0.447 -1,0.999 0,0.208 0.064,0.401 0.172,0.561C19.695,10.028 20,10.975 20,11.993c0,2.759 -2.238,4.996 -4.999,4.996l-5.586,-0.001 1.294,-1.291 0.084,-0.095c0.281,-0.362 0.279,-0.872 -0.006,-1.231L10.709,14.284 10.614,14.2C10.252,13.92 9.741,13.922 9.382,14.206L9.294,14.284 6.289,17.287 6.206,17.382c-0.281,0.362 -0.279,0.872 0.006,1.231l0.078,0.087 3.005,3.003 0.094,0.083c0.392,0.305 0.96,0.277 1.32,-0.083 0.363,-0.362 0.389,-0.934 0.078,-1.326l-0.078,-0.087 -1.304,-1.303 5.596,0.001 0.241,-0.004C18.996,18.857 22,15.776 22,11.993 22,10.534 21.552,9.178 20.787,8.057Z"
android:fillColor="#212121"/>
<path
android:pathData="M14.712,2.289 L14.625,2.211C14.233,1.901 13.661,1.926 13.298,2.289L13.22,2.376C12.91,2.768 12.936,3.34 13.298,3.702l1.299,1.297 -5.598,0 -0.241,0.004C5.004,5.13 2,8.211 2,11.993c0,1.445 0.438,2.787 1.189,3.898 0.182,0.251 0.477,0.415 0.811,0.415 0.552,0 1,-0.447 1,-0.999C5,15.091 4.931,14.891 4.815,14.729L4.68,14.511C4.248,13.772 4,12.911 4,11.993 4,9.234 6.238,6.998 8.999,6.998L14.595,6.998 13.298,8.295 13.22,8.382c-0.311,0.392 -0.285,0.964 0.078,1.326 0.391,0.39 1.024,0.39 1.414,0L17.718,6.705 17.795,6.618C18.106,6.226 18.08,5.654 17.718,5.292Z"
android:strokeWidth="3"
android:fillColor="#212121"/>
<path
android:pathData="M20.11,5.619L20.11,5.619A1.393,0.037 0,0 1,21.503 5.656L21.503,5.656A1.393,0.037 0,0 1,20.11 5.693L20.11,5.693A1.393,0.037 0,0 1,18.717 5.656L18.717,5.656A1.393,0.037 0,0 1,20.11 5.619z"
android:strokeWidth="52.513"
android:fillColor="#613583"
android:fillType="evenOdd"
android:fillAlpha="0.0156863"/>
</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="M12.82 5.58l-0.821 0.822-0.823-0.823c-2.1-2.1-5.503-2.1-7.602 0-2.099 2.099-2.099 5.502 0 7.601l7.896 7.896c0.293 0.293 0.767 0.293 1.06 0l7.902-7.897c2.094-2.106 2.098-5.5-0.002-7.6-2.103-2.102-5.507-2.102-7.61 0zm6.548 6.541L12 19.485 4.635 12.12c-1.513-1.514-1.513-3.967 0-5.48 1.513-1.514 3.967-1.514 5.48 0l1.357 1.357c0.298 0.298 0.783 0.292 1.074-0.013L13.88 6.64c1.517-1.517 3.973-1.517 5.49 0 1.513 1.514 1.51 3.96-0.002 5.481z" android:fillColor="@color/fluent_default_icon_tint"/>
</vector>

View File

@@ -1,3 +1,3 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android" android:width="24dp" android:height="24dp" android:viewportWidth="24" android:viewportHeight="24"> <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="M20.998 6.25c0-1.795-1.454-3.25-3.25-3.25H6.25C4.455 3 3 4.455 3 6.25v11.499c0 1.795 1.455 3.25 3.25 3.25h4.914l0.356-1.424 0.02-0.076H6.25c-0.204 0-0.4-0.035-0.582-0.1l5.807-5.685 0.083-0.07c0.291-0.213 0.7-0.19 0.966 0.07l2.079 2.036 1.06-1.06-2.09-2.048-0.128-0.116c-0.878-0.738-2.187-0.7-3.02 0.116l-5.822 5.7C4.536 18.157 4.5 17.957 4.5 17.75V6.25c0-0.966 0.783-1.75 1.75-1.75h11.499c0.966 0 1.75 0.784 1.75 1.75v4.983c0.478-0.19 0.993-0.264 1.5-0.22V6.25zm-3.495 2.502c0-1.244-1.008-2.252-2.252-2.252-1.244 0-2.252 1.008-2.252 2.252 0 1.243 1.008 2.252 2.252 2.252 1.244 0 2.252-1.009 2.252-2.252zm-3.004 0C14.499 8.336 14.836 8 15.251 8s0.752 0.336 0.752 0.752c0 0.415-0.337 0.752-0.752 0.752s-0.752-0.337-0.752-0.752zm4.6 3.917l-5.902 5.901c-0.345 0.345-0.589 0.776-0.707 1.248l-0.457 1.83c-0.2 0.797 0.522 1.518 1.318 1.319l1.83-0.458c0.472-0.118 0.904-0.362 1.248-0.706L22.33 15.9c0.892-0.893 0.892-2.34 0-3.232-0.893-0.893-2.34-0.893-3.233 0z" android:fillColor="@color/gray_25"/> <path android:pathData="M20.998 6.25c0-1.795-1.454-3.25-3.25-3.25H6.25C4.455 3 3 4.455 3 6.25v11.499c0 1.795 1.455 3.25 3.25 3.25h4.914l0.356-1.424 0.02-0.076H6.25c-0.204 0-0.4-0.035-0.582-0.1l5.807-5.685 0.083-0.07c0.291-0.213 0.7-0.19 0.966 0.07l2.079 2.036 1.06-1.06-2.09-2.048-0.128-0.116c-0.878-0.738-2.187-0.7-3.02 0.116l-5.822 5.7C4.536 18.157 4.5 17.957 4.5 17.75V6.25c0-0.966 0.783-1.75 1.75-1.75h11.499c0.966 0 1.75 0.784 1.75 1.75v4.983c0.478-0.19 0.993-0.264 1.5-0.22V6.25zm-3.495 2.502c0-1.244-1.008-2.252-2.252-2.252-1.244 0-2.252 1.008-2.252 2.252 0 1.243 1.008 2.252 2.252 2.252 1.244 0 2.252-1.009 2.252-2.252zm-3.004 0C14.499 8.336 14.836 8 15.251 8s0.752 0.336 0.752 0.752c0 0.415-0.337 0.752-0.752 0.752s-0.752-0.337-0.752-0.752zm4.6 3.917l-5.902 5.901c-0.345 0.345-0.589 0.776-0.707 1.248l-0.457 1.83c-0.2 0.797 0.522 1.518 1.318 1.319l1.83-0.458c0.472-0.118 0.904-0.362 1.248-0.706L22.33 15.9c0.892-0.893 0.892-2.34 0-3.232-0.893-0.893-2.34-0.893-3.233 0z" android:fillColor="?colorGray25"/>
</vector> </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="M12 2c5.43 0 9.848 4.327 9.996 9.72L22 12v1.525c-0.014 2.198-1.8 3.975-4 3.975-1.446 0-2.712-0.767-3.415-1.916-0.8 0.834-1.882 1.35-3.085 1.35-2.515 0-4.5-2.25-4.5-4.967C7 9.25 8.985 7 11.5 7c0.937 0 1.8 0.312 2.514 0.844C14.087 7.366 14.501 7 15 7c0.513 0 0.935 0.386 0.993 0.883L16 8v5.5c0 1.105 0.895 2 2 2 1.054 0 1.918-0.816 1.994-1.85L20 13.474V12c0-4.418-3.582-8-8-8s-8 3.582-8 8 3.582 8 8 8c0.921 0 1.82-0.155 2.67-0.456 0.52-0.184 1.092 0.089 1.276 0.61 0.184 0.52-0.089 1.091-0.61 1.276C14.275 21.806 13.15 22 12 22 6.477 22 2 17.523 2 12S6.477 2 12 2zm-0.35 7.005L11.5 9C10.15 9 9 10.302 9 11.967c0 1.664 1.15 2.966 2.5 2.966 1.3 0 2.415-1.207 2.495-2.783L14 11.93c-0.017-1.586-1.075-2.834-2.35-2.925L11.5 9l0.15 0.005z" 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="24dp" android:height="24dp" android:viewportWidth="24" android:viewportHeight="24">
<path android:pathData="M10.987 2.89c0.077-0.408-0.19-0.8-0.598-0.877-0.407-0.077-0.799 0.19-0.876 0.598L8.494 7.998 3.75 8C3.335 8 3 8.336 3 8.75 3 9.166 3.336 9.5 3.75 9.5l4.46-0.002-0.946 5L2.75 14.5C2.335 14.5 2 14.836 2 15.25 2 15.665 2.336 16 2.75 16l4.23-0.002-0.967 5.116c-0.077 0.407 0.19 0.8 0.598 0.876 0.407 0.077 0.799-0.19 0.876-0.598l1.02-5.395 5.474-0.002-0.968 5.119c-0.077 0.407 0.19 0.8 0.598 0.876 0.407 0.077 0.799-0.19 0.876-0.598l1.021-5.398 4.742-0.002c0.415 0 0.75-0.336 0.75-0.75 0-0.415-0.336-0.75-0.75-0.75l-4.458 0.002 0.946-5 4.512-0.002c0.415 0 0.75-0.336 0.75-0.75s-0.336-0.75-0.75-0.75l-4.23 0.002 0.966-5.104c0.077-0.408-0.19-0.8-0.598-0.877-0.407-0.077-0.799 0.19-0.876 0.598l-1.018 5.384-5.474 0.002 0.966-5.107zm-1.25 6.608l5.474-0.003-0.946 5-5.474 0.002 0.946-5z" 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="24dp" android:height="24dp" android:viewportWidth="24" android:viewportHeight="24">
<path android:pathData="M11 17.5c0-1.289 0.376-2.49 1.023-3.5h-7.77c-1.242 0-2.25 1.007-2.25 2.25v0.919c0 0.572 0.18 1.13 0.511 1.596C4.056 20.929 6.58 22 10 22c0.932 0 1.797-0.08 2.592-0.24C11.601 20.62 11 19.13 11 17.5zm4-10.495c0-2.761-2.238-5-5-5-2.761 0-5 2.239-5 5s2.239 5 5 5c2.762 0 5-2.239 5-5zM23 17.5c0-3.037-2.462-5.5-5.5-5.5-3.037 0-5.5 2.463-5.5 5.5 0 3.038 2.463 5.5 5.5 5.5 3.038 0 5.5-2.462 5.5-5.5zm-5.59-3.492L17.5 14l0.09 0.008c0.204 0.037 0.365 0.198 0.402 0.402L18 14.5V17h2.504l0.09 0.008c0.204 0.037 0.365 0.198 0.402 0.402l0.008 0.09-0.008 0.09c-0.037 0.204-0.198 0.365-0.402 0.402L20.504 18H18v2.5l-0.008 0.09c-0.037 0.204-0.198 0.365-0.402 0.402L17.5 21l-0.09-0.008c-0.204-0.037-0.364-0.198-0.402-0.402L17 20.5V18h-2.496l-0.09-0.008c-0.204-0.037-0.365-0.198-0.402-0.402l-0.008-0.09 0.008-0.09c0.037-0.204 0.198-0.365 0.402-0.402L14.504 17H17v-2.5l0.008-0.09c0.038-0.204 0.198-0.365 0.402-0.402z" 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="24dp" android:height="24dp" android:viewportWidth="24" android:viewportHeight="24">
<path android:pathData="M5.694 12L2.299 3.27C2.063 2.664 2.655 2.083 3.241 2.29l0.093 0.039 18 9c0.518 0.259 0.55 0.968 0.097 1.284l-0.097 0.058-18 9c-0.583 0.291-1.216-0.245-1.065-0.848l0.03-0.095L5.694 12 2.299 3.27 5.694 12zM4.402 4.54l2.61 6.71h6.627c0.38 0 0.693 0.282 0.743 0.648L14.389 12c0 0.38-0.282 0.693-0.649 0.743l-0.1 0.007H7.01l-2.609 6.71L19.322 12 4.401 4.54z" android:fillColor="?colorButtonText"/>
</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="M5.694 12L2.299 3.27C2.063 2.664 2.655 2.083 3.241 2.29l0.093 0.039 18 9c0.518 0.259 0.55 0.968 0.097 1.284l-0.097 0.058-18 9c-0.583 0.291-1.216-0.245-1.065-0.848l0.03-0.095L5.694 12 2.299 3.27 5.694 12zM4.402 4.54l2.61 6.71h6.627c0.38 0 0.693 0.282 0.743 0.648L14.389 12c0 0.38-0.282 0.693-0.649 0.743l-0.1 0.007H7.01l-2.609 6.71L19.322 12 4.401 4.54z" android:fillColor="@color/fluent_default_icon_tint"/>
</vector>

View File

@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:drawable="@drawable/ic_fluent_send_24_enabled" android:state_activated="true"/>
<item android:drawable="@drawable/ic_fluent_send_24_enabled" android:state_checked="true"/>
<item android:drawable="@drawable/ic_fluent_send_24_enabled" android:state_selected="true"/>
<item android:drawable="@drawable/ic_fluent_send_24_enabled" android:state_enabled="true"/>
<item android:drawable="@drawable/ic_fluent_send_24_regular"/>
</selector>

View File

@@ -0,0 +1,3 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android" android:autoMirrored="true" android:width="24dp" android:height="24dp" android:viewportWidth="24" android:viewportHeight="24">
<path android:pathData="M5.997 12c0 0.38 0.282 0.694 0.647 0.743l0.102 0.007H19.44l-2.216 2.22c-0.266 0.266-0.29 0.683-0.073 0.976l0.073 0.084c0.266 0.267 0.682 0.29 0.975 0.073l0.084-0.073 3.497-3.5c0.267-0.266 0.29-0.683 0.073-0.976L21.78 11.47l-3.497-3.5c-0.292-0.293-0.767-0.293-1.06 0-0.265 0.266-0.29 0.683-0.072 0.976l0.073 0.084 2.216 2.22H6.746c-0.414 0-0.75 0.336-0.75 0.75zM2 12c0 2.761 2.237 5 4.996 5 2.143 0 3.972-1.351 4.68-3.25h-1.651C9.42 14.797 8.29 15.5 6.995 15.5 5.066 15.5 3.5 13.933 3.5 12s1.565-3.5 3.497-3.5c1.294 0 2.425 0.704 3.03 1.75h1.651C10.968 8.352 9.14 7 6.996 7 4.236 7 2 9.239 2 12z" 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="24dp" android:height="24dp" android:viewportWidth="24" android:viewportHeight="24">
<path android:pathData="M15.25 13c0.967 0 1.75 0.784 1.75 1.75v4.5c0 0.966-0.783 1.75-1.75 1.75H3.75C2.785 21 2 20.216 2 19.25v-4.5C2 13.784 2.785 13 3.75 13h11.5zM21 14.899v5.351c0 0.414-0.335 0.75-0.75 0.75-0.38 0-0.693-0.282-0.743-0.648L19.5 20.25v-5.338C19.732 14.969 19.975 15 20.226 15c0.268 0 0.527-0.035 0.775-0.101zM15.25 14.5H3.75c-0.138 0-0.25 0.112-0.25 0.25v4.5c0 0.138 0.112 0.25 0.25 0.25h11.5c0.139 0 0.25-0.112 0.25-0.25v-4.5c0-0.138-0.111-0.25-0.25-0.25zm5-4.408c1.054 0 1.908 0.854 1.908 1.908 0 1.054-0.854 1.908-1.908 1.908-1.053 0-1.908-0.854-1.908-1.908 0-1.054 0.855-1.908 1.908-1.908zM15.246 3c0.967 0 1.75 0.784 1.75 1.75v4.5c0 0.966-0.783 1.75-1.75 1.75h-11.5c-0.966 0-1.75-0.784-1.75-1.75v-4.5c0-0.918 0.707-1.671 1.607-1.744L3.746 3h11.5zm0 1.5h-11.5L3.69 4.507C3.579 4.533 3.496 4.632 3.496 4.75v4.5c0 0.138 0.112 0.25 0.25 0.25h11.5c0.138 0 0.25-0.112 0.25-0.25v-4.5c0-0.138-0.112-0.25-0.25-0.25zM20.25 3c0.38 0 0.694 0.282 0.744 0.648L21 3.75v5.351C20.754 9.035 20.495 9 20.227 9c-0.25 0-0.494 0.03-0.726 0.088V3.75C19.5 3.336 19.836 3 20.25 3z" 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="24dp" android:height="24dp" android:viewportWidth="24" android:viewportHeight="24">
<path android:pathData="M16.953 5.303c0.167-0.526-0.124-1.088-0.65-1.256-0.526-0.167-1.089 0.124-1.256 0.65-0.124 0.389-0.236 0.899-0.324 1.344-0.565 0.012-1.12 0-1.652-0.038-0.55-0.04-1.03 0.375-1.069 0.926-0.039 0.55 0.376 1.03 0.927 1.069 0.46 0.032 0.934 0.048 1.416 0.047-0.106 0.612-0.184 1.176-0.24 1.697-1.263 0.717-2.142 1.685-2.636 2.701-0.624 1.283-0.7 2.857 0.239 3.883 0.675 0.736 1.704 0.758 2.499 0.588 0.322-0.068 0.654-0.176 0.988-0.32 0.255 0.346 0.716 0.5 1.142 0.348 0.52-0.186 0.79-0.759 0.604-1.278L16.9 15.549c1.148-0.931 2.202-2.307 2.735-4.06 0.286 0.251 0.507 0.55 0.658 0.864 0.284 0.594 0.334 1.271 0.099 1.91-0.234 0.633-0.78 1.313-1.84 1.843-0.493 0.247-0.694 0.847-0.447 1.341 0.247 0.494 0.848 0.695 1.342 0.448 1.44-0.72 2.385-1.758 2.821-2.94 0.434-1.176 0.332-2.414-0.17-3.464-0.44-0.918-1.171-1.68-2.104-2.165C19.998 9.22 20 9.11 20 9c0-0.552-0.448-1-1-1-0.473 0-0.87 0.329-0.974 0.77-0.567-0.045-1.17-0.003-1.796 0.138 0.047-0.304 0.102-0.626 0.166-0.964 0.977-0.094 1.944-0.253 2.842-0.473 0.536-0.131 0.864-0.672 0.733-1.209-0.131-0.536-0.673-0.864-1.21-0.733-0.621 0.152-1.285 0.272-1.963 0.358 0.048-0.208 0.1-0.409 0.155-0.583zm-3.686 8.015c0.166-0.34 0.414-0.697 0.758-1.037 0.02 0.348 0.053 0.67 0.098 0.973 0.083 0.56 0.207 1.048 0.341 1.477-0.243 0.109-0.47 0.184-0.674 0.227-0.429 0.092-0.588 0.019-0.614 0.006l-0.004-0.001c-0.162-0.193-0.329-0.774 0.095-1.645zm4.498-2.562c-0.308 1.112-0.89 2.03-1.568 2.73-0.035-0.164-0.067-0.338-0.095-0.525-0.076-0.513-0.117-1.132-0.088-1.904 0.033-0.013 0.067-0.024 0.1-0.036l1.651-0.265zm-1.651 0.265l1.651-0.265c-0.495-0.025-1.049 0.053-1.651 0.265zM7.536 6.29c-2.02-0.589-3.67-0.038-4.456 0.33-0.5 0.234-0.716 0.83-0.482 1.33 0.234 0.5 0.83 0.715 1.33 0.481 0.53-0.248 1.66-0.626 3.048-0.222 0.365 0.107 0.569 0.248 0.69 0.37 0.122 0.123 0.204 0.27 0.258 0.454 0.067 0.225 0.087 0.446 0.09 0.69C7.84 9.68 7.655 9.64 7.459 9.606c-1.146-0.199-2.733-0.215-4.262 0.64-1.271 0.713-1.796 2.168-1.682 3.448 0.12 1.326 0.94 2.679 2.572 3.136 1.48 0.414 2.913-0.045 3.877-0.507l0.08-0.04c0.122 0.416 0.506 0.719 0.96 0.719 0.553 0 1-0.448 1-1V10.5c0-0.053 0.002-0.12 0.005-0.2 0.012-0.417 0.034-1.16-0.168-1.838C9.71 8.023 9.48 7.57 9.086 7.172S8.176 6.478 7.538 6.29H7.537zm-0.419 5.287c0.344 0.06 0.647 0.143 0.887 0.222v2.197c-0.224 0.156-0.538 0.35-0.904 0.525-0.792 0.38-1.682 0.605-2.473 0.384-0.698-0.195-1.06-0.742-1.119-1.389-0.062-0.693 0.243-1.286 0.667-1.523 0.987-0.553 2.06-0.569 2.943-0.415z" 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="24dp" android:height="24dp" android:viewportWidth="24" android:viewportHeight="24">
<path android:pathData="M16.961 5.987c0.13-0.394-0.082-0.818-0.475-0.949-0.393-0.13-0.818 0.083-0.948 0.476-0.148 0.445-0.304 1.04-0.42 1.512-0.736 0.026-1.446 0.018-2.067-0.024-0.413-0.028-0.771 0.284-0.8 0.697-0.027 0.413 0.285 0.771 0.698 0.8 0.563 0.038 1.19 0.05 1.844 0.037-0.144 0.765-0.241 1.449-0.3 2.064-1.215 0.642-2.061 1.504-2.539 2.412-0.613 1.166-0.66 2.556 0.206 3.443 0.571 0.584 1.408 0.64 2.129 0.485 0.405-0.087 0.825-0.248 1.24-0.474l0.018 0.046c0.145 0.389 0.577 0.586 0.965 0.44 0.388-0.144 0.585-0.576 0.44-0.964-0.056-0.152-0.114-0.291-0.17-0.424 1.023-0.936 1.915-2.308 2.285-4.047 0.638 0.312 1.07 0.836 1.278 1.4 0.227 0.613 0.213 1.312-0.097 1.952-0.308 0.636-0.933 1.265-2.015 1.681-0.387 0.149-0.58 0.583-0.431 0.97 0.149 0.386 0.582 0.579 0.969 0.43 1.387-0.533 2.33-1.402 2.827-2.427 0.494-1.02 0.518-2.143 0.154-3.127-0.414-1.116-1.3-2.01-2.505-2.424 0.002-0.073 0.003-0.147 0.003-0.222C19.25 9.336 18.914 9 18.5 9c-0.405 0-0.735 0.322-0.75 0.724-0.524-0.005-1.084 0.07-1.672 0.237 0.064-0.455 0.148-0.953 0.257-1.5 1.185-0.089 2.364-0.252 3.337-0.48 0.403-0.095 0.653-0.5 0.558-0.902-0.095-0.404-0.498-0.654-0.902-0.559-0.767 0.18-1.69 0.318-2.637 0.406 0.085-0.33 0.18-0.67 0.27-0.94zm-3.68 7.723c0.227-0.43 0.6-0.886 1.147-1.3 0.017 0.492 0.065 0.926 0.137 1.317 0.094 0.52 0.236 0.974 0.386 1.373-0.306 0.171-0.632 0.3-0.977 0.374-0.485 0.104-0.687-0.012-0.742-0.068-0.24-0.245-0.394-0.853 0.05-1.696zm4.315-2.487c-0.21 0.966-0.7 2.022-1.414 2.848-0.052-0.184-0.1-0.385-0.142-0.612-0.089-0.49-0.14-1.092-0.111-1.866 0.11-0.042 0.222-0.082 0.339-0.12 0.481-0.16 0.924-0.238 1.328-0.25zM7.96 6.53C5.72 5.878 3.958 6.681 3.385 6.997c-0.363 0.2-0.494 0.657-0.294 1.02C3.29 8.378 3.747 8.51 4.11 8.31c0.405-0.223 1.736-0.833 3.43-0.34 0.773 0.227 1.098 0.64 1.264 1.056 0.133 0.332 0.175 0.691 0.188 1.042-0.27-0.075-0.581-0.15-0.923-0.21-1.132-0.202-2.682-0.263-4.122 0.427-1.586 0.76-2.13 2.316-1.902 3.697 0.224 1.356 1.216 2.666 2.8 2.951 1.43 0.258 2.806-0.256 3.757-0.761 0.14-0.074 0.271-0.148 0.396-0.222v0.3c0 0.414 0.335 0.75 0.75 0.75 0.414 0 0.75-0.336 0.75-0.75v-5.79c0-0.454 0-1.236-0.3-1.99-0.331-0.829-1.005-1.578-2.236-1.94H7.96zm-0.153 4.804c0.483 0.086 0.898 0.206 1.19 0.305v2.506l-0.105 0.078C8.653 14.4 8.31 14.63 7.9 14.847c-0.84 0.447-1.85 0.779-2.788 0.61-0.845-0.152-1.445-0.866-1.586-1.72-0.138-0.83 0.179-1.673 1.07-2.1 1.037-0.496 2.226-0.478 3.212-0.303z" android:fillColor="@color/fluent_default_icon_tint"/>
</vector>

View File

@@ -5,5 +5,5 @@
android:viewportHeight="4"> android:viewportHeight="4">
<path <path
android:pathData="M4,2C4,3.1046 3.1046,4 2,4C0.8954,4 0,3.1046 0,2C0,0.8954 0.8954,0 2,0C3.1046,0 4,0.8954 4,2ZM10,2C10,3.1046 9.1046,4 8,4C6.8954,4 6,3.1046 6,2C6,0.8954 6.8954,0 8,0C9.1046,0 10,0.8954 10,2ZM14,4C15.1046,4 16,3.1046 16,2C16,0.8954 15.1046,0 14,0C12.8954,0 12,0.8954 12,2C12,3.1046 12.8954,4 14,4Z" android:pathData="M4,2C4,3.1046 3.1046,4 2,4C0.8954,4 0,3.1046 0,2C0,0.8954 0.8954,0 2,0C3.1046,0 4,0.8954 4,2ZM10,2C10,3.1046 9.1046,4 8,4C6.8954,4 6,3.1046 6,2C6,0.8954 6.8954,0 8,0C9.1046,0 10,0.8954 10,2ZM14,4C15.1046,4 16,3.1046 16,2C16,0.8954 15.1046,0 14,0C12.8954,0 12,0.8954 12,2C12,3.1046 12.8954,4 14,4Z"
android:fillColor="@color/gray_500"/> android:fillColor="?colorGray500"/>
</vector> </vector>

View File

@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:state_selected="true" android:drawable="@drawable/ic_fluent_translate_24_filled"/>
<item android:state_enabled="true" android:drawable="@drawable/ic_fluent_translate_24_regular"/>
<item android:drawable="@drawable/ic_fluent_translate_24_regular"/>
</selector>

View File

@@ -1,5 +0,0 @@
<vector android:height="24dp" android:tint="#000000"
android:viewportHeight="24" android:viewportWidth="24"
android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
<path android:fillColor="?colorSecondary" android:pathData="M12.87,15.07l-2.54,-2.51 0.03,-0.03c1.74,-1.94 2.98,-4.17 3.71,-6.53L17,6L17,4h-7L10,2L8,2v2L1,4v1.99h11.17C11.5,7.92 10.44,9.75 9,11.35 8.07,10.32 7.3,9.19 6.69,8h-2c0.73,1.63 1.73,3.17 2.98,4.56l-5.09,5.02L4,19l5,-5 3.11,3.11 0.76,-2.04zM18.5,10h-2L12,22h2l1.12,-3h4.75L21,22h2l-4.5,-12zM15.88,17l1.62,-4.33L19.12,17h-3.24z"/>
</vector>

View File

@@ -1,5 +0,0 @@
<vector android:height="24dp" android:tint="#000000"
android:viewportHeight="24" android:viewportWidth="24"
android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
<path android:fillColor="?colorSecondary" android:pathData="M12.87,15.07l-2.54,-2.51 0.03,-0.03c1.74,-1.94 2.98,-4.17 3.71,-6.53L17,6L17,4h-7L10,2L8,2v2L1,4v1.99h11.17C11.5,7.92 10.44,9.75 9,11.35 8.07,10.32 7.3,9.19 6.69,8h-2c0.73,1.63 1.73,3.17 2.98,4.56l-5.09,5.02L4,19l5,-5 3.11,3.11 0.76,-2.04zM18.5,10h-2L12,22h2l1.12,-3h4.75L21,22h2l-4.5,-12zM15.88,17l1.62,-4.33L19.12,17h-3.24z"/>
</vector>

View File

@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"> <shape xmlns:android="http://schemas.android.com/apk/res/android">
<corners android:radius="27dp"/> <corners android:radius="27dp"/>
<stroke android:width="2dp" android:color="@color/gray_25"/> <stroke android:width="2dp" android:color="?colorGray25"/>
</shape> </shape>

View File

@@ -2,14 +2,14 @@
<layer-list xmlns:android="http://schemas.android.com/apk/res/android"> <layer-list xmlns:android="http://schemas.android.com/apk/res/android">
<item android:gravity="center_vertical"> <item android:gravity="center_vertical">
<shape> <shape>
<solid android:color="@color/gray_500"/> <solid android:color="?colorGray500"/>
<corners android:radius="1dp"/> <corners android:radius="1dp"/>
<size android:height="2dp"/> <size android:height="2dp"/>
</shape> </shape>
</item> </item>
<item android:gravity="center_vertical" android:id="@android:id/secondaryProgress"> <item android:gravity="center_vertical" android:id="@android:id/secondaryProgress">
<clip> <clip>
<shape android:tint="@color/gray_50"> <shape android:tint="?colorGray50">
<solid android:color="#40000000"/> <solid android:color="#40000000"/>
<corners android:radius="1dp"/> <corners android:radius="1dp"/>
<size android:height="2dp"/> <size android:height="2dp"/>
@@ -19,7 +19,7 @@
<item android:gravity="center_vertical" android:id="@android:id/progress"> <item android:gravity="center_vertical" android:id="@android:id/progress">
<clip> <clip>
<shape> <shape>
<solid android:color="@color/gray_50"/> <solid android:color="?colorGray50"/>
<corners android:radius="1dp"/> <corners android:radius="1dp"/>
<size android:height="2dp"/> <size android:height="2dp"/>
</shape> </shape>

View File

@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="oval"> <shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="oval">
<solid android:color="@color/gray_25"/> <solid android:color="?colorGray25"/>
<size android:width="18dp" android:height="18dp"/> <size android:width="18dp" android:height="18dp"/>
</shape> </shape>

View File

@@ -6,7 +6,7 @@
android:shape="ring" android:shape="ring"
android:thickness="4dp" android:thickness="4dp"
android:useLevel="true"> android:useLevel="true">
<solid android:color="@color/gray_100"/> <solid android:color="?colorGray100"/>
</shape> </shape>
</item> </item>
</layer-list> </layer-list>

View File

@@ -83,7 +83,7 @@
android:layout_alignParentTop="true" android:layout_alignParentTop="true"
android:src="@drawable/ic_fluent_dismiss_24_filled" android:src="@drawable/ic_fluent_dismiss_24_filled"
android:contentDescription="@string/cancel" android:contentDescription="@string/cancel"
android:tint="@color/gray_100" android:tint="?colorGray100"
android:background="@drawable/bg_upload_progress"/> android:background="@drawable/bg_upload_progress"/>
<ProgressBar <ProgressBar
@@ -104,7 +104,7 @@
android:layout_height="16dp" android:layout_height="16dp"
android:layout_below="@id/retry_or_cancel_upload" android:layout_below="@id/retry_or_cancel_upload"
android:layout_marginTop="16dp" android:layout_marginTop="16dp"
android:textColor="@color/gray_200" android:textColor="?colorGray200"
android:textSize="14dp" android:textSize="14dp"
android:gravity="center_horizontal" android:gravity="center_horizontal"
android:singleLine="true" android:singleLine="true"
@@ -119,7 +119,7 @@
android:layout_height="32dp" android:layout_height="32dp"
android:layout_below="@id/state_title" android:layout_below="@id/state_title"
android:includeFontPadding="false" android:includeFontPadding="false"
android:textColor="@color/gray_200" android:textColor="?colorGray200"
android:gravity="center_horizontal|top" android:gravity="center_horizontal|top"
android:lines="2" android:lines="2"
android:maxLines="2" android:maxLines="2"

View File

@@ -26,20 +26,8 @@
android:layout_width="36dp" android:layout_width="36dp"
android:layout_height="36dp" android:layout_height="36dp"
android:layout_marginTop="-6dp" android:layout_marginTop="-6dp"
android:layout_marginEnd="6dp" android:layout_marginRight="6dp"
android:layout_toStartOf="@id/more" android:layout_toLeftOf="@id/more"
android:background="?android:selectableItemBackgroundBorderless"
android:scaleType="center"
android:src="@drawable/ic_visibility"
android:tint="?android:textColorSecondary" />
<ImageView
android:id="@+id/translate"
android:layout_width="36dp"
android:layout_height="36dp"
android:layout_marginTop="-6dp"
android:layout_marginEnd="6dp"
android:layout_toStartOf="@id/visibility"
android:background="?android:selectableItemBackgroundBorderless" android:background="?android:selectableItemBackgroundBorderless"
android:scaleType="center" android:scaleType="center"
android:src="@drawable/ic_visibility" android:src="@drawable/ic_visibility"
@@ -58,7 +46,7 @@
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="24dp" android:layout_height="24dp"
android:layout_marginEnd="8dp" android:layout_marginEnd="8dp"
android:layout_toStartOf="@id/translate" android:layout_toStartOf="@id/visibility"
android:layout_toEndOf="@id/avatar"> android:layout_toEndOf="@id/avatar">
<TextView <TextView
@@ -90,7 +78,7 @@
android:layout_height="20dp" android:layout_height="20dp"
android:layout_below="@id/name_wrap" android:layout_below="@id/name_wrap"
android:layout_marginEnd="8dp" android:layout_marginEnd="8dp"
android:layout_toStartOf="@id/translate" android:layout_toStartOf="@id/visibility"
android:layout_toEndOf="@id/avatar" android:layout_toEndOf="@id/avatar"
android:layoutDirection="locale" android:layoutDirection="locale"
android:orientation="horizontal"> android:orientation="horizontal">

View File

@@ -7,6 +7,7 @@
android:paddingBottom="12dp"> android:paddingBottom="12dp">
<LinearLayout <LinearLayout
android:id="@+id/text_wrap"
android:orientation="vertical" android:orientation="vertical"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content"> android:layout_height="wrap_content">
@@ -32,10 +33,9 @@
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:textAppearance="@style/m3_title_medium" android:textAppearance="@style/m3_title_medium"
android:background="@color/error_900" android:background="?colorBackgroundLight"
tools:text="CW title"/> tools:text="CW title"/>
<View <View
android:id="@+id/border_bottom" android:id="@+id/border_bottom"
android:layout_width="match_parent" android:layout_width="match_parent"
@@ -49,27 +49,58 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:paddingHorizontal="16dp" android:paddingHorizontal="16dp"
android:textSize="16sp" android:textSize="16sp"
android:textAppearance="@style/m3_body_large" android:textAppearance="@style/m3_body_large"/>
tools:text="setting up my mstdn"/>
<!-- <Button--> <org.joinmastodon.android.ui.views.AutoOrientationLinearLayout
<!-- android:id="@+id/translate"--> android:id="@+id/translate_wrap"
<!-- android:layout_width="wrap_content"--> android:layout_width="match_parent"
<!-- android:layout_height="32dp"--> android:layout_height="wrap_content"
<!-- android:background="@drawable/bg_inline_button"--> android:layout_marginTop="8dp"
<!-- android:elevation="0dp"--> android:gravity="center_vertical">
<!-- android:ellipsize="middle"-->
<!-- android:fontFamily="sans-serif-medium"-->
<!-- android:singleLine="true"-->
<!-- android:stateListAnimator="@null"-->
<!-- android:textColor="?android:textColorPrimary"-->
<!-- android:textSize="16sp"-->
<!-- tools:text="@string/pink_color" />-->
<FrameLayout
android:id="@+id/action_btn_wrap"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginHorizontal="8dp"
android:clipToPadding="false">
<org.joinmastodon.android.ui.views.ProgressBarButton
android:id="@+id/translate_btn"
style="?secondaryButtonStyle"
android:background="?android:selectableItemBackground"
android:textColor="?android:textColorSecondary"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:paddingHorizontal="8dp"
tools:text="@string/sk_translate_post"/>
<ProgressBar
android:id="@+id/translate_progress"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:indeterminate="true"
style="?android:progressBarStyleSmall"
android:elevation="10dp"
android:outlineProvider="none"
android:indeterminateTint="?android:textColorPrimary"
android:visibility="gone"/>
</FrameLayout>
<TextView
android:id="@+id/translate_info"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginHorizontal="16dp"
android:layout_marginVertical="4dp"
android:layout_weight="1"
android:textColor="?android:textColorSecondary"
android:textAlignment="textEnd"
tools:text="Translated using TranslateEngine" />
</org.joinmastodon.android.ui.views.AutoOrientationLinearLayout>
</LinearLayout> </LinearLayout>
<LinearLayout <LinearLayout
android:visibility="gone" android:visibility="gone"
android:id="@+id/spoiler_overlay" android:id="@+id/spoiler_overlay"

View File

@@ -294,7 +294,7 @@
android:id="@+id/btn_visibility" android:id="@+id/btn_visibility"
android:layout_width="24dp" android:layout_width="24dp"
android:layout_height="24dp" android:layout_height="24dp"
android:layout_marginEnd="24dp" android:layout_marginEnd="16dp"
android:background="?android:attr/selectableItemBackgroundBorderless" android:background="?android:attr/selectableItemBackgroundBorderless"
android:padding="0px" android:padding="0px"
android:tint="@color/compose_button" android:tint="@color/compose_button"
@@ -316,6 +316,16 @@
android:textColor="?android:textColorSecondary" android:textColor="?android:textColorSecondary"
tools:text="500"/> tools:text="500"/>
<Button
android:id="@+id/publish"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="8dp"
android:visibility="gone"
android:tooltipText="@string/publish"
android:drawableStart="@drawable/ic_fluent_send_24_selector"
/>
</LinearLayout> </LinearLayout>
</org.joinmastodon.android.ui.views.SizeListenerLinearLayout> </org.joinmastodon.android.ui.views.SizeListenerLinearLayout>

View File

@@ -42,7 +42,7 @@
android:layout_margin="16dp" android:layout_margin="16dp"
android:paddingRight="8dp" android:paddingRight="8dp"
android:paddingLeft="8dp" android:paddingLeft="8dp"
android:textColor="@color/gray_50t" android:textColor="?colorGray50t"
android:textAllCaps="true" android:textAllCaps="true"
android:fontFamily="sans-serif-medium" android:fontFamily="sans-serif-medium"
android:textSize="14dp" android:textSize="14dp"
@@ -85,7 +85,7 @@
<LinearLayout <LinearLayout
android:id="@+id/posts_btn" android:id="@+id/posts_btn"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="56dp" android:layout_height="wrap_content"
android:layout_marginTop="12dp" android:layout_marginTop="12dp"
android:layout_marginEnd="12dp" android:layout_marginEnd="12dp"
android:gravity="center_horizontal" android:gravity="center_horizontal"
@@ -112,7 +112,7 @@
<LinearLayout <LinearLayout
android:id="@+id/following_btn" android:id="@+id/following_btn"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="56dp" android:layout_height="wrap_content"
android:layout_marginTop="12dp" android:layout_marginTop="12dp"
android:layout_marginEnd="16dp" android:layout_marginEnd="16dp"
android:padding="4dp" android:padding="4dp"
@@ -140,7 +140,7 @@
<LinearLayout <LinearLayout
android:id="@+id/followers_btn" android:id="@+id/followers_btn"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="56dp" android:layout_height="wrap_content"
android:layout_marginTop="12dp" android:layout_marginTop="12dp"
android:layout_marginEnd="12dp" android:layout_marginEnd="12dp"
android:padding="4dp" android:padding="4dp"

View File

@@ -0,0 +1,46 @@
<?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="match_parent"
android:layout_height="48dp"
android:paddingHorizontal="16dp"
android:gravity="center_vertical"
android:layoutDirection="locale">
<ImageView
android:id="@+id/icon"
android:layout_width="24dp"
android:layout_height="24dp"
android:layout_marginEnd="32dp"
android:importantForAccessibility="no"
android:tint="?android:textColorPrimary"
tools:src="@drawable/ic_fluent_color_24_regular"/>
<TextView
android:id="@+id/text"
android:layout_height="wrap_content"
android:layout_width="0dp"
android:layout_weight="1"
android:layout_marginEnd="8dp"
android:gravity="center_vertical"
android:textColor="?android:textColorPrimary"
android:textSize="16sp" />
<Button
android:id="@+id/button"
android:layout_width="wrap_content"
android:layout_height="32dp"
android:background="@drawable/bg_inline_button"
android:elevation="0dp"
android:ellipsize="middle"
android:fontFamily="sans-serif-medium"
android:singleLine="true"
android:stateListAnimator="@null"
android:textColor="?android:textColorPrimary"
android:textSize="16sp"
tools:text="@string/sk_color_palette_pink" />
</LinearLayout>

View File

@@ -15,7 +15,7 @@
android:layout_marginEnd="32dp" android:layout_marginEnd="32dp"
android:importantForAccessibility="no" android:importantForAccessibility="no"
android:tint="?android:textColorPrimary" android:tint="?android:textColorPrimary"
tools:src="@drawable/ic_color_theme_preference"/> tools:src="@drawable/ic_fluent_color_24_regular"/>
<TextView <TextView
@@ -27,7 +27,7 @@
android:textSize="16sp" android:textSize="16sp"
android:singleLine="true" android:singleLine="true"
android:ellipsize="end" android:ellipsize="end"
android:text="@string/sk_settings_color_picker"/> android:text="@string/sk_settings_color_palette"/>
<Button <Button
android:id="@+id/color_picker_button" android:id="@+id/color_picker_button"

View File

@@ -2,23 +2,22 @@
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools" xmlns:tools="http://schemas.android.com/tools"
android:orientation="horizontal" android:orientation="horizontal"
android:paddingLeft="16dp" android:paddingHorizontal="16dp"
android:paddingRight="16dp"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="48dp" android:layout_height="wrap_content"
android:gravity="center_vertical" android:gravity="center_vertical"
android:layoutDirection="locale"> android:layoutDirection="locale">
<TextView <TextView
android:id="@+id/text" android:id="@+id/text"
android:layout_width="match_parent" android:layout_width="0dp"
android:layout_weight="1" android:layout_weight="1"
android:layout_height="48dp" android:layout_height="wrap_content"
android:paddingRight="16dp" android:minHeight="48dp"
android:paddingVertical="8dp"
android:paddingEnd="16dp"
android:gravity="center_vertical" android:gravity="center_vertical"
android:textSize="16sp" android:textSize="16sp"
android:textColor="?android:textColorPrimary" android:textColor="?android:textColorPrimary"
android:singleLine="true"
android:ellipsize="end"
tools:text="Account settings"/> tools:text="Account settings"/>
<ProgressBar <ProgressBar
android:id="@+id/progress" android:id="@+id/progress"
@@ -27,4 +26,8 @@
android:layout_gravity="center" android:layout_gravity="center"
android:alpha="0" android:alpha="0"
/> />
<ImageView
android:id="@+id/icon"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
</LinearLayout> </LinearLayout>

View File

@@ -7,69 +7,95 @@
<LinearLayout <LinearLayout
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="match_parent"
android:minHeight="64dp"
android:gravity="center_vertical"
android:paddingStart="16dp"
android:background="@drawable/bg_settings_update" android:background="@drawable/bg_settings_update"
android:orientation="horizontal"> android:orientation="vertical">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@drawable/bg_settings_update"
android:gravity="center_vertical"
android:minHeight="64dp"
android:orientation="horizontal"
android:paddingStart="16dp">
<TextView
android:id="@+id/text"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginTop="16dp"
android:layout_marginEnd="4dp"
android:layout_marginBottom="16dp"
android:layout_weight="1"
android:textAppearance="@style/m3_body_medium"
tools:text="@string/sk_update_available" />
<FrameLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content">
<Button
android:id="@+id/button"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical|end"
android:background="?android:selectableItemBackground"
android:paddingLeft="16dp"
android:paddingRight="16dp"
android:stateListAnimator="@null"
android:textAllCaps="true"
android:textColor="?android:textColorPrimary"
android:textSize="14dp"
tools:text="@string/install_update" />
<ImageButton
android:id="@+id/cancel_btn"
android:layout_width="40dp"
android:layout_height="40dp"
android:layout_gravity="end|center_vertical"
android:layout_marginEnd="16dp"
android:background="@drawable/bg_update_download_progress"
android:contentDescription="@string/cancel"
android:src="@drawable/ic_fluent_dismiss_16_filled"
android:tint="?colorSearchHint"
android:visibility="gone" />
<ProgressBar
android:id="@+id/progress"
android:layout_width="40dp"
android:layout_height="40dp"
android:layout_gravity="end|center_vertical"
android:layout_marginEnd="16dp"
android:indeterminate="false"
android:indeterminateOnly="false"
android:max="1000"
android:padding="0dp"
android:progressDrawable="@drawable/update_progress"
android:visibility="gone" />
</FrameLayout>
</LinearLayout>
<TextView <TextView
android:id="@+id/text" android:id="@+id/changelog_header"
android:layout_width="0dp" android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textColor="?android:textColorPrimary"
android:textStyle="bold"
android:textSize="16dp"
android:paddingStart="16dp"
android:text="@string/sk_changelog" />
<TextView
android:id="@+id/changelog"
android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_weight="1"
android:layout_marginEnd="4dp"
android:layout_marginTop="16dp"
android:layout_marginBottom="16dp"
android:textAppearance="@style/m3_body_medium" android:textAppearance="@style/m3_body_medium"
tools:text="@string/sk_update_available"/> android:padding="16dp"
android:text="Changelog" />
<FrameLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content">
<Button
android:id="@+id/button"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical|end"
android:background="?android:selectableItemBackground"
android:textColor="?colorAccentLight"
android:textAllCaps="true"
android:textSize="14dp"
android:paddingLeft="16dp"
android:paddingRight="16dp"
android:stateListAnimator="@null"
tools:text="@string/install_update"/>
<ImageButton
android:id="@+id/cancel_btn"
android:layout_width="40dp"
android:layout_height="40dp"
android:layout_gravity="end|center_vertical"
android:layout_marginEnd="16dp"
android:background="@drawable/bg_update_download_progress"
android:tint="?colorSearchHint"
android:contentDescription="@string/cancel"
android:visibility="gone"
android:src="@drawable/ic_fluent_dismiss_16_filled"/>
<ProgressBar
android:id="@+id/progress"
android:layout_width="40dp"
android:layout_height="40dp"
android:layout_gravity="end|center_vertical"
android:layout_marginEnd="16dp"
android:progressDrawable="@drawable/update_progress"
android:max="1000"
android:padding="0dp"
android:visibility="gone"
android:indeterminateOnly="false"
android:indeterminate="false"/>
</FrameLayout>
</LinearLayout> </LinearLayout>
</FrameLayout> </FrameLayout>

View File

@@ -12,7 +12,6 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_weight="1" android:layout_weight="1"
android:paddingHorizontal="16dp" android:paddingHorizontal="16dp"
android:drawableLeft="@drawable/ic_fluent_people_community_24_regular"
android:drawableTint="?android:textColorSecondary" android:drawableTint="?android:textColorSecondary"
android:drawablePadding="16dp" android:drawablePadding="16dp"
android:textAppearance="@style/m3_title_medium" android:textAppearance="@style/m3_title_medium"
@@ -26,6 +25,7 @@
android:clickable="false" android:clickable="false"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="match_parent" android:layout_height="match_parent"
android:visibility="gone"
android:paddingRight="16dp"/> android:paddingRight="16dp"/>
<!-- <ImageView--> <!-- <ImageView-->

View File

@@ -55,7 +55,7 @@
android:layout_marginRight="8dp" android:layout_marginRight="8dp"
android:layout_marginBottom="8dp" android:layout_marginBottom="8dp"
android:src="@drawable/ic_pause_24" android:src="@drawable/ic_pause_24"
android:tint="@color/gray_50" android:tint="?colorGray50"
android:contentDescription="@string/pause" android:contentDescription="@string/pause"
android:background="?android:selectableItemBackgroundBorderless"/> android:background="?android:selectableItemBackgroundBorderless"/>

View File

@@ -1,10 +1,12 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<menu xmlns:android="http://schemas.android.com/apk/res/android"> <menu xmlns:android="http://schemas.android.com/apk/res/android">
<item android:id="@+id/m3_color" android:title="@string/sk_color_theme_material3"/> <item android:id="@+id/m3_color" android:title="@string/sk_color_palette_material3"/>
<item android:id="@+id/purple_color" android:title="@string/sk_color_theme_purple"/> <item android:id="@+id/purple_color" android:title="@string/sk_color_palette_purple"/>
<item android:id="@+id/pink_color" android:title="@string/sk_color_theme_pink"/> <item android:id="@+id/pink_color" android:title="@string/sk_color_palette_pink"/>
<item android:id="@+id/green_color" android:title="@string/sk_color_theme_green"/> <item android:id="@+id/green_color" android:title="@string/sk_color_palette_green"/>
<item android:id="@+id/blue_color" android:title="@string/sk_color_theme_blue"/> <item android:id="@+id/blue_color" android:title="@string/sk_color_palette_blue"/>
<item android:id="@+id/orange_color" android:title="@string/sk_color_theme_brown"/> <item android:id="@+id/brown_color" android:title="@string/sk_color_palette_brown"/>
<item android:id="@+id/yellow_color" android:title="@string/sk_color_theme_yellow"/> <item android:id="@+id/yellow_color" android:title="@string/sk_color_palette_yellow"/>
<item android:id="@+id/red_color" android:title="@string/sk_color_palette_red"/>
<item android:id="@+id/nord_color" android:title="@string/sk_color_palette_nord"/>
</menu> </menu>

View File

@@ -1,6 +1,7 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<menu xmlns:android="http://schemas.android.com/apk/res/android"> <menu xmlns:android="http://schemas.android.com/apk/res/android">
<item android:id="@+id/bookmarks" android:title="@string/bookmarks" android:icon="@drawable/ic_fluent_bookmark_multiple_24_regular" android:showAsAction="always"/> <item android:id="@+id/bookmarks" android:title="@string/bookmarks" android:icon="@drawable/ic_fluent_bookmark_24_regular" android:showAsAction="always"/>
<item android:id="@+id/favorites" android:title="@string/your_favorites" android:icon="@drawable/ic_fluent_star_24_regular"/> <item android:id="@+id/favorites" android:title="@string/your_favorites" android:icon="@drawable/ic_fluent_star_24_regular" android:showAsAction="always"/>
<item android:id="@+id/share" android:title="@string/share_user" android:icon="@drawable/ic_fluent_share_24_regular"/> <item android:id="@+id/followed_hashtags" android:title="@string/sk_hashtags_you_follow" android:icon="@drawable/ic_fluent_number_symbol_24_regular" android:showAsAction="always"/>
<item android:id="@+id/share" android:title="@string/share_user" android:icon="@drawable/ic_fluent_share_24_regular" android:showAsAction="always"/>
</menu> </menu>

View File

@@ -40,11 +40,11 @@
<string name="sk_settings_show_federated_timeline">Mostra la línia de temps federada</string> <string name="sk_settings_show_federated_timeline">Mostra la línia de temps federada</string>
<string name="sk_notification_type_status">Publicacions</string> <string name="sk_notification_type_status">Publicacions</string>
<string name="sk_notify_posts">Notificacions de publicacions</string> <string name="sk_notify_posts">Notificacions de publicacions</string>
<string name="sk_settings_color_picker">Color de tema</string> <string name="sk_settings_color_palette">Color de tema</string>
<string name="sk_color_theme_pink">Rosa</string> <string name="sk_color_palette_pink">Rosa</string>
<string name="sk_color_theme_purple">Lila</string> <string name="sk_color_palette_purple">Lila</string>
<string name="sk_color_theme_green">Verd</string> <string name="sk_color_palette_green">Verd</string>
<string name="sk_color_theme_blue">Blau</string> <string name="sk_color_palette_blue">Blau</string>
<string name="sk_color_theme_brown">Marró</string> <string name="sk_color_palette_brown">Marró</string>
<string name="sk_color_theme_yellow">Groc</string> <string name="sk_color_palette_yellow">Groc</string>
</resources> </resources>

View File

@@ -1,6 +1,7 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<resources> <resources>
<string name="get_started">Loslegen</string> <string name="get_started">Loslegen</string>
<string name="already_have_account">Ich habe bereits ein Konto</string>
<string name="log_in">Anmelden</string> <string name="log_in">Anmelden</string>
<string name="next">Weiter</string> <string name="next">Weiter</string>
<string name="loading_instance">Server-Informationen werden abgerufen …</string> <string name="loading_instance">Server-Informationen werden abgerufen …</string>
@@ -181,6 +182,7 @@
<string name="username">Profilname</string> <string name="username">Profilname</string>
<string name="email">E-Mail</string> <string name="email">E-Mail</string>
<string name="password">Passwort</string> <string name="password">Passwort</string>
<string name="confirm_password">Passwort bestätigen</string>
<string name="password_note">Verwende Großbuchstaben, Sonderzeichen und Zahlen, um deine Passwortstärke zu erhöhen.</string> <string name="password_note">Verwende Großbuchstaben, Sonderzeichen und Zahlen, um deine Passwortstärke zu erhöhen.</string>
<string name="category_academia">Bildung</string> <string name="category_academia">Bildung</string>
<string name="category_activism">Bürgerbeteiligung</string> <string name="category_activism">Bürgerbeteiligung</string>
@@ -197,6 +199,7 @@
<string name="category_tech">Technik</string> <string name="category_tech">Technik</string>
<string name="confirm_email_title">Eine letzte Sache noch</string> <string name="confirm_email_title">Eine letzte Sache noch</string>
<string name="confirm_email_subtitle">Tippe auf den Link, den wir dir per E-Mail geschickt haben, um dein Konto zu verifizieren.</string> <string name="confirm_email_subtitle">Tippe auf den Link, den wir dir per E-Mail geschickt haben, um dein Konto zu verifizieren.</string>
<string name="confirm_email_didnt_get">Keinen Link bekommen?</string>
<string name="resend">Erneut abschicken</string> <string name="resend">Erneut abschicken</string>
<string name="open_email_app">E-Mail-App öffnen</string> <string name="open_email_app">E-Mail-App öffnen</string>
<string name="resent_email">Bestätigung per E-Mail zugeschickt</string> <string name="resent_email">Bestätigung per E-Mail zugeschickt</string>
@@ -390,4 +393,25 @@
<string name="login_title">Willkommen zurück</string> <string name="login_title">Willkommen zurück</string>
<string name="login_subtitle">Melde dich mit dem Server an, auf dem du dein Konto erstellt hast.</string> <string name="login_subtitle">Melde dich mit dem Server an, auf dem du dein Konto erstellt hast.</string>
<string name="server_url">Serveradresse</string> <string name="server_url">Serveradresse</string>
<string name="welcome_page1_title">Was ist {logo}?</string>
<string name="welcome_page1_text">Stellen Sie sich vor, Sie haben eine E-Mail-Adresse mit der Endung @example.com.\n\nSie können weiterhin E-Mails von jeder Person senden und empfangen, auch wenn deren E-Mail-Adresse auf @gmail.com oder @icloud.com oder @example.com endet.</string>
<string name="welcome_page2_title">Mastodon ist genau so.</string>
<string name="welcome_page2_text">Ihr Handle könnte @gothgirl654@example.social sein, aber Sie können trotzdem @fallout5ever@example.online folgen, rebloggen und mit ihm chatten.</string>
<string name="welcome_page3_title">Wie wählt man einen Server aus?</string>
<string name="welcome_page3_text">Verschiedene Leute wählen verschiedene Server aus verschiedenen Gründen. art.example ist ein großartiger Ort für Künstler, während glasgow.example eine gute Wahl für Schotten ist. Sie können mit keinem unserer empfohlenen Server etwas falsch machen, also egal welchen Sie wählen (oder ob Sie Ihren eigenen in die Serversuchleiste eingeben), Sie werden nirgendwo etwas verpassen.</string>
<string name="signup_random_server_explain">Wir wählen einen Server auf der Grundlage Ihrer Sprache, wenn Sie fortfahren, ohne eine Auswahl zu treffen.</string>
<string name="server_filter_any_language">Beliebige Sprache</string>
<string name="server_filter_instant_signup">Instant Sign-up</string>
<string name="server_filter_manual_review">Manuelle Überprüfung</string>
<string name="server_filter_any_signup_speed">Beliebige Anmeldegeschwindigkeit</string>
<string name="server_filter_region_europe">Europa</string>
<string name="server_filter_region_north_america">Nord Amerika</string>
<string name="server_filter_region_south_america">Süd Amerika</string>
<string name="server_filter_region_africa">Afrika</string>
<string name="server_filter_region_asia">Asien</string>
<string name="server_filter_region_oceania">Ozeanien</string>
<string name="not_accepting_new_members">Keine neuen Mitglieder aufnehmen</string>
<string name="category_special_interests">Besondere Interessen</string>
<string name="signup_passwords_dont_match">Passwörter stimmen nicht überein</string>
<string name="loading_fediverse_resource_title">Ich habe im Fediverse nachgeschaut...</string>
</resources> </resources>

View File

@@ -27,6 +27,7 @@
<string name="sk_federated_timeline_info_banner">Das sind die neuesten Beiträge von Personen, die in der Föderation deines Servers sind.</string> <string name="sk_federated_timeline_info_banner">Das sind die neuesten Beiträge von Personen, die in der Föderation deines Servers sind.</string>
<string name="sk_update_available">Moshidon %s ist zum Herunterladen bereit.</string> <string name="sk_update_available">Moshidon %s ist zum Herunterladen bereit.</string>
<string name="sk_update_ready">Moshidon %s wurde heruntergeladen und kann jetzt installiert werden.</string> <string name="sk_update_ready">Moshidon %s wurde heruntergeladen und kann jetzt installiert werden.</string>
<string name="sk_changelog">Changelog:</string>
<string name="sk_check_for_update">Auf Update prüfen</string> <string name="sk_check_for_update">Auf Update prüfen</string>
<string name="sk_no_update_available">Kein Update verfügbar</string> <string name="sk_no_update_available">Kein Update verfügbar</string>
<string name="sk_list_timelines">Listen</string> <string name="sk_list_timelines">Listen</string>
@@ -36,24 +37,57 @@
<string name="sk_lists_with_user">Listen mit %s</string> <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_settings_always_reveal_content_warnings">Inhaltswarnungen immer ausklappen</string>
<string name="sk_disable_marquee">Laufschrift in Titelleisten deaktivieren</string> <string name="sk_disable_marquee">Laufschrift in Titelleisten deaktivieren</string>
<string name="sk_disable_dividers">Tröt Trennung deaktivieren</string>
<string name="sk_settings_contribute">Zu Moshidon beitragen</string> <string name="sk_settings_contribute">Zu Moshidon beitragen</string>
<string name="sk_settings_show_federated_timeline">Föderierte Timeline anzeigen</string> <string name="sk_settings_show_federated_timeline">Föderierte Timeline anzeigen</string>
<string name="sk_notification_type_status">Beiträge</string>
<string name="sk_notify_posts">Beitrags-Benachrichtigungen</string> <string name="sk_notify_posts">Beitrags-Benachrichtigungen</string>
<string name="sk_settings_color_picker">Farbschema</string> <string name="sk_settings_color_picker">Farbschema</string>
<string name="sk_color_theme_pink">Pink</string> <string name="sk_color_palette_material3">System</string>
<string name="sk_color_theme_purple">Violett</string> <string name="sk_color_palette_pink">Pink</string>
<string name="sk_color_theme_green">Grün</string> <string name="sk_color_palette_purple">Violett</string>
<string name="sk_color_theme_brown">Braun</string> <string name="sk_color_palette_green">Grün</string>
<string name="sk_color_theme_yellow">Gelb</string> <string name="sk_color_palette_blue">Blau</string>
<string name="sk_notification_type_status">Beiträge</string> <string name="sk_color_palette_brown">Braun</string>
<string name="sk_color_theme_blue">Blau</string> <string name="sk_color_palette_red">Rot</string>
<string name="sk_color_palette_yellow">Gelb</string>
<string name="sk_color_palette_nord">Nord</string>
<string name="sk_poll_allow_multiple">Mehrfachantworten erlauben</string> <string name="sk_poll_allow_multiple">Mehrfachantworten erlauben</string>
<string name="sk_translated_using">Übersetzt mit %s</string>
<string name="sk_post_language">Sprache: %s</string>
<string name="sk_language_name">%s (%s)</string>
<string name="sk_confirm_clear_recent_languages">Sicher, dass du die Liste der zuletzt verwendeten Sprachen leeren willst\?</string>
<string name="sk_translate_post">Übersetzen</string> <string name="sk_translate_post">Übersetzen</string>
<string name="sk_translate_show_original">Original anzeigen</string> <string name="sk_translate_show_original">Original anzeigen</string>
<string name="sk_translated_using">Übersetzt mit %s</string>
<string name="sk_post_language">Sprache: %s</string>
<string name="sk_available_languages">Verfügbare Sprachen</string> <string name="sk_available_languages">Verfügbare Sprachen</string>
<string name="sk_language_name">%s (%s)</string>
<string name="sk_clear_recent_languages">Zuletzt verwendete Sprachen leeren</string> <string name="sk_clear_recent_languages">Zuletzt verwendete Sprachen leeren</string>
<string name="sk_confirm_clear_recent_languages">Sicher, dass du die Liste der zuletzt verwendeten Sprachen leeren willst\?</string>
<string name="sk_welcome_title">Willkommen!</string>
<string name="sk_welcome_text">Der Hai sagt Hi! Um anzufangen, bitte gib den Domain-Namen deiner Heim-Instanz unten ein.</string>
<string name="sk_example_domain">beispiel.social</string>
<string name="sk_tabs_disable_swipe">Wischen zwischen Tabs deaktivieren</string>
<string name="sk_settings_profile">Profil einrichten</string>
<string name="sk_settings_posting">Einstellungen für Beiträge</string>
<string name="sk_settings_filters">Filter konfigurieren</string>
<string name="sk_settings_auth">Sicherheitseinstellungen</string>
<string name="sk_settings_rules">Regelwerk</string>
<string name="sk_settings_about">Über die App</string>
<string name="sk_settings_donate">Spenden</string>
<string name="sk_delete_notification">Benachrichtigung löschen</string>
<string name="sk_delete_notification_confirm_action">Benachrichtigung löschen</string>
<string name="sk_delete_notification_confirm">Sind Sie sicher, dass Sie diese Benachrichtigung löschen möchten?</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">Sind Sie sicher, dass Sie alle Notifikationen löschen wollen?</string>
<string name="sk_enable_delete_notifications">Löschen von Benachrichtigungen aktivieren</string>
<string name="sk_settings_show_differentiated_notification_icons">Benutzerdefinierte Icons für Interaktionen</string>
<string name="sk_settings_publish_button_text">Text der Schaltfläche Veröffentlichen</string>
<string name="sk_settings_publish_button_text_title">Anpassen des Textes der Schaltfläche Veröffentlichen</string>
<string name="sk_settings_hide_translate_in_timeline">Schaltfläche Übersetzen in der Zeitleiste ausblenden</string>
<string name="sk_settings_translation_availability_note_available">%s unterstützt Übersetzung!</string>
<string name="sk_settings_translation_availability_note_unavailable">%s scheint die Übersetzung nicht zu unterstützen.</string>
<string name="sk_loading_fediverse_resource_title">Ich habe im Fediverse nachgeschaut...</string>
<string name="sk_undo_reblog">Rebloggen rückgängig machen</string>
<string name="sk_reblog_with_visibility">Rebloggen mit Sichtbarkeit</string>
<string name="sk_quote_post">Beitrag darüber</string>
<string name="sk_hashtags_you_follow">Hashtags, denen du folgst</string>
</resources> </resources>

View File

@@ -56,4 +56,9 @@
<string name="sk_language_name">%s (%s)</string> <string name="sk_language_name">%s (%s)</string>
<string name="sk_confirm_clear_recent_languages">¿Confirma que quiere vaciar sus idiomas usados recientemente\?</string> <string name="sk_confirm_clear_recent_languages">¿Confirma que quiere vaciar sus idiomas usados recientemente\?</string>
<string name="sk_clear_recent_languages">Vaciar idiomas usados recientemente</string> <string name="sk_clear_recent_languages">Vaciar idiomas usados recientemente</string>
<string name="sk_welcome_text">¡El tiburón te saluda! Para empezar, introduzca a continuación el nombre del dominio de su instancia de origen.</string>
<string name="sk_example_domain">example.social</string>
<string name="sk_welcome_title">¡Bienvenidos!</string>
<string name="sk_color_theme_material3">Sistema</string>
<string name="sk_color_theme_red">Rojo</string>
</resources> </resources>

View File

@@ -56,4 +56,9 @@
<string name="sk_language_name">%s (%s)</string> <string name="sk_language_name">%s (%s)</string>
<string name="sk_confirm_clear_recent_languages">Êtes-vous sûr de vouloir effacer vos langues récemment utilisées \?</string> <string name="sk_confirm_clear_recent_languages">Êtes-vous sûr de vouloir effacer vos langues récemment utilisées \?</string>
<string name="sk_clear_recent_languages">Effacer les langues récemment utilisées</string> <string name="sk_clear_recent_languages">Effacer les langues récemment utilisées</string>
<string name="sk_example_domain">exemple.social</string>
<string name="sk_welcome_title">Bienvenue !</string>
<string name="sk_welcome_text">Le requin vous salue ! Pour commencer, veuillez entrer le nom de domaine de votre instance personnelle ci-dessous.</string>
<string name="sk_color_theme_material3">Système</string>
<string name="sk_color_theme_red">Rouge</string>
</resources> </resources>

View File

@@ -28,7 +28,7 @@
<string name="sk_app_name">Moshidon</string> <string name="sk_app_name">Moshidon</string>
<string name="sk_confirm_delete_and_redraft">Hapus dan tulis ulang kiriman ini\?</string> <string name="sk_confirm_delete_and_redraft">Hapus dan tulis ulang kiriman ini\?</string>
<string name="sk_confirm_unpin_post">Apakah Anda yakin untuk menghapus sematan kiriman ini\?</string> <string name="sk_confirm_unpin_post">Apakah Anda yakin untuk menghapus sematan kiriman ini\?</string>
<string name="sk_settings_contribute">Kontribusi ke Moshidon</string> <string name="sk_settings_contribute">Berkontribusi ke Moshidon</string>
<string name="sk_pinned_posts">Disematkan</string> <string name="sk_pinned_posts">Disematkan</string>
<string name="sk_pin_post">Sematkan ke profil</string> <string name="sk_pin_post">Sematkan ke profil</string>
<string name="sk_visibility_unlisted">Tidak terdaftar</string> <string name="sk_visibility_unlisted">Tidak terdaftar</string>
@@ -41,10 +41,24 @@
<string name="sk_notification_type_status">Kiriman</string> <string name="sk_notification_type_status">Kiriman</string>
<string name="sk_notify_posts">Notifikasi kiriman</string> <string name="sk_notify_posts">Notifikasi kiriman</string>
<string name="sk_settings_color_picker">Warna tema</string> <string name="sk_settings_color_picker">Warna tema</string>
<string name="sk_color_theme_pink">Merah muda</string> <string name="sk_color_theme_pink">Merah Muda</string>
<string name="sk_color_theme_purple">Ungu</string> <string name="sk_color_theme_purple">Ungu</string>
<string name="sk_color_theme_green">Hijau</string> <string name="sk_color_theme_green">Hijau</string>
<string name="sk_color_theme_blue">Biru</string> <string name="sk_color_theme_blue">Biru</string>
<string name="sk_color_theme_brown">Cokelat</string> <string name="sk_color_theme_brown">Cokelat</string>
<string name="sk_color_theme_yellow">Kuning</string> <string name="sk_color_theme_yellow">Kuning</string>
<string name="sk_poll_allow_multiple">Perbolehkan beberapa pilihan</string>
<string name="sk_clear_recent_languages">Hapus bahasa terkini yang digunakan</string>
<string name="sk_welcome_title">Selamat datang!</string>
<string name="sk_confirm_clear_recent_languages">Apakah Anda yakin ingin menghapus bahasa terkini yang Anda gunakan\?</string>
<string name="sk_color_theme_material3">Sistem</string>
<string name="sk_available_languages">Bahasa yang tersedia</string>
<string name="sk_language_name">%s (%s)</string>
<string name="sk_translate_post">Terjemahkan</string>
<string name="sk_translate_show_original">Tampilkan yang asli</string>
<string name="sk_post_language">Bahasa: %s</string>
<string name="sk_example_domain">contoh.social</string>
<string name="sk_color_theme_red">Merah</string>
<string name="sk_translated_using">Diterjemahkan menggunakan %s</string>
<string name="sk_welcome_text">Hiu menyapamu! Untuk memulai, silakan memasukkan nama domain instansi Anda di bawah.</string>
</resources> </resources>

View File

@@ -2,13 +2,13 @@
<resources> <resources>
<string name="sk_notification_type_status">Post</string> <string name="sk_notification_type_status">Post</string>
<string name="sk_notify_posts">Notifiche post</string> <string name="sk_notify_posts">Notifiche post</string>
<string name="sk_settings_color_picker">Colore del tema</string> <string name="sk_settings_color_palette">Colore del tema</string>
<string name="sk_color_theme_pink">Rosa</string> <string name="sk_color_palette_pink">Rosa</string>
<string name="sk_color_theme_purple">Viola</string> <string name="sk_color_palette_purple">Viola</string>
<string name="sk_color_theme_green">Verde</string> <string name="sk_color_palette_green">Verde</string>
<string name="sk_color_theme_blue">Blu</string> <string name="sk_color_palette_blue">Blu</string>
<string name="sk_color_theme_brown">Marrone</string> <string name="sk_color_palette_brown">Marrone</string>
<string name="sk_color_theme_yellow">Giallo</string> <string name="sk_color_palette_yellow">Giallo</string>
<string name="sk_app_name">Moshidon</string> <string name="sk_app_name">Moshidon</string>
<string name="sk_pinned_posts">Fissati</string> <string name="sk_pinned_posts">Fissati</string>
<string name="sk_delete_and_redraft">Elimina e riscrivi</string> <string name="sk_delete_and_redraft">Elimina e riscrivi</string>
@@ -47,4 +47,17 @@
<string name="sk_settings_show_federated_timeline">Mostra timeline federata</string> <string name="sk_settings_show_federated_timeline">Mostra timeline federata</string>
<string name="sk_disable_marquee">Disabilita scorrimento titoli</string> <string name="sk_disable_marquee">Disabilita scorrimento titoli</string>
<string name="sk_reject_follow_request">Rifiuta richiesta di seguirti</string> <string name="sk_reject_follow_request">Rifiuta richiesta di seguirti</string>
<string name="sk_translate_post">Traduci</string>
<string name="sk_translate_show_original">Mostra originale</string>
<string name="sk_translated_using">Tradotto con %s</string>
<string name="sk_post_language">Lingua: %s</string>
<string name="sk_language_name">%s (%s)</string>
<string name="sk_confirm_clear_recent_languages">Sei sicuro di voler cancellare le lingue usate di recente\?</string>
<string name="sk_clear_recent_languages">Cancella lingue usate di recente</string>
<string name="sk_welcome_title">Benvenuto!</string>
<string name="sk_example_domain">example.social</string>
<string name="sk_poll_allow_multiple">Consenti scelte multiple</string>
<string name="sk_available_languages">Lingue disponibili</string>
<string name="sk_welcome_text">Lo squalo ti saluta! Per iniziare inserisci il dominio dell\'istanza a cui sei iscritto.</string>
<string name="sk_color_palette_material3">Sistema</string>
</resources> </resources>

View File

@@ -56,4 +56,9 @@
<string name="sk_available_languages">모든 언어</string> <string name="sk_available_languages">모든 언어</string>
<string name="sk_clear_recent_languages">최근 사용한 언어 지우기</string> <string name="sk_clear_recent_languages">최근 사용한 언어 지우기</string>
<string name="sk_confirm_clear_recent_languages">정말로 최근 사용한 언어를 지우시겠습니까\?</string> <string name="sk_confirm_clear_recent_languages">정말로 최근 사용한 언어를 지우시겠습니까\?</string>
<string name="sk_example_domain">example.social</string>
<string name="sk_welcome_title">환영합니다!</string>
<string name="sk_welcome_text">상어가 당신을 맞이합니다! 시작하기 위해, 아래에 사용하시는 인스턴스의 도메인 이름을 입력해주세요.</string>
<string name="sk_color_theme_material3">시스템</string>
<string name="sk_color_theme_red">빨간색</string>
</resources> </resources>

Some files were not shown because too many files have changed in this diff Show More