Compare commits
131 Commits
1.1.4+fork
...
developmen
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
770fde7aac | ||
|
|
29b8cedc7c | ||
|
|
33b65c3bf3 | ||
|
|
34ab1bcd9c | ||
|
|
20086d76ce | ||
|
|
1ca4fb5c37 | ||
|
|
1604c067fd | ||
|
|
0c7419e2b3 | ||
|
|
7cf30ccb98 | ||
|
|
875695c239 | ||
|
|
61049a1302 | ||
|
|
28db90aa82 | ||
|
|
f0e7fc5e3b | ||
|
|
2169afa8e7 | ||
|
|
508ec06d93 | ||
|
|
9fb39d9403 | ||
|
|
4879d74f80 | ||
|
|
ba3f6c4f95 | ||
|
|
481241c4f6 | ||
|
|
5798587dc6 | ||
|
|
066e3e08a2 | ||
|
|
16d6c14633 | ||
|
|
80a4a3551c | ||
|
|
74f3bb8708 | ||
|
|
c3e398b3c2 | ||
|
|
dcfa812c83 | ||
|
|
065e65d708 | ||
|
|
bca0dab381 | ||
|
|
4a45c1055e | ||
|
|
7c789746ce | ||
|
|
f46ce5576c | ||
|
|
730e6fc1fa | ||
|
|
cb36cc042c | ||
|
|
5d586418f9 | ||
|
|
44f1d026d6 | ||
|
|
defaa1095c | ||
|
|
c67f2f8027 | ||
|
|
452128565f | ||
|
|
6322d3c984 | ||
|
|
d68c820e58 | ||
|
|
79f37b4813 | ||
|
|
87460a2fb6 | ||
|
|
6774a642d9 | ||
|
|
f0bd9233b7 | ||
|
|
66efe750a8 | ||
|
|
3658fc423b | ||
|
|
3c3ad7447e | ||
|
|
b570064b99 | ||
|
|
d9f6ef69fe | ||
|
|
bdac1d5bb4 | ||
|
|
1eee1ead5e | ||
|
|
0ec51f5b34 | ||
|
|
6c6fb05a7a | ||
|
|
09a0faacba | ||
|
|
d0d1d15de5 | ||
|
|
e4e9516d5d | ||
|
|
05eceecbea | ||
|
|
71ba1bb0d5 | ||
|
|
2160a26648 | ||
|
|
5433eac9c9 | ||
|
|
0a68f86200 | ||
|
|
c91dae0346 | ||
|
|
e1df7e5077 | ||
|
|
0560b54559 | ||
|
|
c78db7e835 | ||
|
|
c837a2d4b6 | ||
|
|
70b91b7a9a | ||
|
|
27079a7ec5 | ||
|
|
9563df0574 | ||
|
|
638209cc13 | ||
|
|
224c731afa | ||
|
|
0bbf937531 | ||
|
|
3556c92c3e | ||
|
|
87c5b23196 | ||
|
|
c83910c885 | ||
|
|
586622e90d | ||
|
|
e5e2430e03 | ||
|
|
04bfdba50e | ||
|
|
7abf15e9e0 | ||
|
|
6b680831b8 | ||
|
|
6cbf100828 | ||
|
|
3e7bbebe7f | ||
|
|
56d344045a | ||
|
|
7ab634cc08 | ||
|
|
9f0db3ebb5 | ||
|
|
6415eb8590 | ||
|
|
87c77b84a4 | ||
|
|
0b7bb16f22 | ||
|
|
5164b5ba78 | ||
|
|
f3c28bc66a | ||
|
|
239f7eb9e7 | ||
|
|
d6daf7a553 | ||
|
|
dfb3b230e6 | ||
|
|
484a5c878f | ||
|
|
3f27cfb13b | ||
|
|
38e2ba6ccd | ||
|
|
3dad38e614 | ||
|
|
0865c9d1bd | ||
|
|
20a8783d84 | ||
|
|
0b96fb05fc | ||
|
|
8767d62de7 | ||
|
|
74fb04e2d4 | ||
|
|
2537460e16 | ||
|
|
be3dfde3be | ||
|
|
42025035ad | ||
|
|
6a667fdf32 | ||
|
|
bfafac3d4f | ||
|
|
0cafbe9f91 | ||
|
|
2fbf172729 | ||
|
|
bb9755f4af | ||
|
|
2a01377a8a | ||
|
|
61cc6d5d07 | ||
|
|
1d74a37f60 | ||
|
|
ef9645f9e7 | ||
|
|
6a103ca3f3 | ||
|
|
c22772121b | ||
|
|
de7bc69d2a | ||
|
|
2eccd572c9 | ||
|
|
824a62024b | ||
|
|
3a3cfda919 | ||
|
|
e29120cc51 | ||
|
|
197d5c6bc3 | ||
|
|
d143cc75db | ||
|
|
1635a06c54 | ||
|
|
76de0d8c70 | ||
|
|
402a995b8f | ||
|
|
f580ba7779 | ||
|
|
bc3869b920 | ||
|
|
020f4a5a1a | ||
|
|
b054caa967 | ||
|
|
82b7633650 |
@@ -1,11 +1,11 @@
|
||||

|
||||

|
||||
|
||||
# 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 won’t ever be implemented, such as the federated timeline, unlisted posting, bookmarks and an image description viewer.
|
||||
|
||||
|
||||
[](https://github.com/LucasGGamerM/moshidon/releases/latest/download/moshidon.apk)
|
||||
[](https://github.com/LucasGGamerM/moshidon/releases/latest/download/moshidon.apk)
|
||||
|
||||
---
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<meta charset="UTF-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<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="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">
|
||||
@@ -14,4 +14,4 @@
|
||||
{{ content }}
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
</html>
|
||||
|
||||
@@ -9,8 +9,8 @@ android {
|
||||
applicationId "org.joinmastodon.android.moshinda"
|
||||
minSdk 23
|
||||
targetSdk 33
|
||||
versionCode 66
|
||||
versionName "1.1.4+fork.66.moshinda"
|
||||
versionCode 72
|
||||
versionName "1.1.4+fork.72.moshinda"
|
||||
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
||||
resConfigs "ar-rSA", "be-rBY", "bn-rBD", "bs-rBA", "ca-rES", "cs-rCZ", "de-rDE", "el-rGR", "es-rES", "eu-rES", "fi-rFI", "fil-rPH", "fr-rFR", "ga-rIE", "gd-rGB", "gl-rES", "hi-rIN", "hr-rHR", "hu-rHU", "hy-rAM", "in-rID", "is-rIS", "it-rIT", "iw-rIL", "ja-rJP", "kab", "ko-rKR", "nl-rNL", "oc-rFR", "pl-rPL", "pt-rBR", "pt-rPT", "ro-rRO", "ru-rRU", "si-rLK", "sl-rSI", "sv-rSE", "th-rTH", "tr-rTR", "uk-rUA", "vi-rVN", "zh-rCN", "zh-rTW"
|
||||
}
|
||||
|
||||
@@ -4,7 +4,8 @@
|
||||
|
||||
<uses-permission android:name="android.permission.INTERNET"/>
|
||||
<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="com.google.android.c2dm.permission.RECEIVE"/>
|
||||
<uses-permission android:name="android.permission.POST_NOTIFICATIONS"/>
|
||||
@@ -19,7 +20,7 @@
|
||||
android:localeConfig="@xml/locales_config"
|
||||
android:icon="@mipmap/ic_launcher"
|
||||
android:roundIcon="@mipmap/ic_launcher_round"
|
||||
android:theme="@style/Theme.Mastodon.AutoLightDark.Original"
|
||||
android:theme="@style/Theme.Mastodon.AutoLightDark"
|
||||
android:largeHeap="true">
|
||||
|
||||
<activity android:name=".MainActivity" android:exported="true" android:configChanges="orientation|screenSize" android:windowSoftInputMode="adjustResize" android:launchMode="singleTask">
|
||||
|
||||
@@ -52,7 +52,8 @@ public class ExternalShareActivity extends FragmentStackActivity{
|
||||
|
||||
Intent intent=getIntent();
|
||||
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");
|
||||
String text=builder.toString();
|
||||
List<Uri> mediaUris;
|
||||
@@ -80,6 +81,8 @@ public class ExternalShareActivity extends FragmentStackActivity{
|
||||
args.putString("account", accountID);
|
||||
if(!TextUtils.isEmpty(text))
|
||||
args.putString("prefilledText", text);
|
||||
if(!subject.isBlank())
|
||||
args.putInt("selectionEnd", subject.length());
|
||||
if(mediaUris!=null && !mediaUris.isEmpty())
|
||||
args.putParcelableArrayList("mediaAttachments", toArrayList(mediaUris));
|
||||
Fragment fragment=new ComposeFragment();
|
||||
|
||||
@@ -25,13 +25,13 @@ public class GlobalUserPreferences{
|
||||
public static boolean showInteractionCounts;
|
||||
public static boolean alwaysExpandContentWarnings;
|
||||
public static boolean disableMarquee;
|
||||
public static boolean disableSwipe;
|
||||
public static boolean voteButtonForSingleChoice;
|
||||
public static ThemePreference theme;
|
||||
public static ColorPreference color;
|
||||
|
||||
private final static Type recentLanguagesType = new TypeToken<Map<String, List<String>>>() {}.getType();
|
||||
public static Map<String, List<String>> recentLanguages;
|
||||
public static Map<String, String> defaultLanguages;
|
||||
|
||||
private static SharedPreferences getPrefs(){
|
||||
return MastodonApp.context.getSharedPreferences("global", Context.MODE_PRIVATE);
|
||||
@@ -54,15 +54,21 @@ public class GlobalUserPreferences{
|
||||
showInteractionCounts=prefs.getBoolean("showInteractionCounts", false);
|
||||
alwaysExpandContentWarnings=prefs.getBoolean("alwaysExpandContentWarnings", false);
|
||||
disableMarquee=prefs.getBoolean("disableMarquee", false);
|
||||
disableSwipe=prefs.getBoolean("disableSwipe", false);
|
||||
voteButtonForSingleChoice=prefs.getBoolean("voteButtonForSingleChoice", true);
|
||||
theme=ThemePreference.values()[prefs.getInt("theme", 0)];
|
||||
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.PURPLE;
|
||||
}
|
||||
} catch (IllegalArgumentException|ClassCastException ignored) {
|
||||
// invalid color name or color was previously saved as integer
|
||||
color=ColorPreference.PURPLE;
|
||||
}
|
||||
}
|
||||
|
||||
public static void save(){
|
||||
@@ -77,20 +83,23 @@ public class GlobalUserPreferences{
|
||||
.putBoolean("showInteractionCounts", showInteractionCounts)
|
||||
.putBoolean("alwaysExpandContentWarnings", alwaysExpandContentWarnings)
|
||||
.putBoolean("disableMarquee", disableMarquee)
|
||||
.putBoolean("disableSwipe", disableSwipe)
|
||||
.putInt("theme", theme.ordinal())
|
||||
.putString("color", color.name())
|
||||
.putString("recentLanguages", gson.toJson(recentLanguages))
|
||||
.putInt("color", color.ordinal())
|
||||
.apply();
|
||||
}
|
||||
|
||||
public enum ColorPreference{
|
||||
MATERIAL3,
|
||||
PURPLE,
|
||||
PINK,
|
||||
PURPLE,
|
||||
GREEN,
|
||||
BLUE,
|
||||
ORANGE,
|
||||
YELLOW
|
||||
BROWN,
|
||||
RED,
|
||||
YELLOW,
|
||||
NORD
|
||||
}
|
||||
|
||||
public enum ThemePreference{
|
||||
@@ -99,3 +108,4 @@ public class GlobalUserPreferences{
|
||||
DARK
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -16,7 +16,7 @@ import org.joinmastodon.android.fragments.HomeFragment;
|
||||
import org.joinmastodon.android.fragments.ProfileFragment;
|
||||
import org.joinmastodon.android.fragments.ThreadFragment;
|
||||
import org.joinmastodon.android.fragments.onboarding.AccountActivationFragment;
|
||||
import org.joinmastodon.android.fragments.onboarding.MoshidonLoginFragment;
|
||||
import org.joinmastodon.android.fragments.onboarding.CustomLoginFragment;
|
||||
import org.joinmastodon.android.model.Notification;
|
||||
import org.joinmastodon.android.ui.utils.UiUtils;
|
||||
import org.joinmastodon.android.updater.GithubSelfUpdater;
|
||||
@@ -33,7 +33,7 @@ public class MainActivity extends FragmentStackActivity{
|
||||
|
||||
if(savedInstanceState==null){
|
||||
if(AccountSessionManager.getInstance().getLoggedInAccounts().isEmpty()){
|
||||
showFragmentClearingBackStack(new MoshidonLoginFragment());
|
||||
showFragmentClearingBackStack(new CustomLoginFragment());
|
||||
}else{
|
||||
AccountSessionManager.getInstance().maybeUpdateLocalInfo();
|
||||
AccountSession session;
|
||||
|
||||
@@ -137,13 +137,20 @@ public class PushNotificationReceiver extends BroadcastReceiver{
|
||||
builder.setContentTitle(pn.title)
|
||||
.setContentText(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))
|
||||
.setWhen(notification==null ? System.currentTimeMillis() : notification.createdAt.toEpochMilli())
|
||||
.setShowWhen(true)
|
||||
.setCategory(Notification.CATEGORY_SOCIAL)
|
||||
.setAutoCancel(true)
|
||||
.setColor(context.getColor(R.color.shortcut_icon_background));
|
||||
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);
|
||||
}
|
||||
if(avatar!=null){
|
||||
builder.setLargeIcon(UiUtils.getBitmapFromDrawable(avatar));
|
||||
}
|
||||
|
||||
@@ -20,6 +20,7 @@ import java.util.HashMap;
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.function.Consumer;
|
||||
|
||||
import androidx.annotation.CallSuper;
|
||||
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){
|
||||
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.setMessage(activity.getString(message));
|
||||
progressDialog.setCancelable(cancelable);
|
||||
if (transform != null) transform.accept(progressDialog);
|
||||
if(cancelable){
|
||||
progressDialog.setOnCancelListener(dialog->cancel());
|
||||
}
|
||||
|
||||
@@ -11,6 +11,7 @@ import org.joinmastodon.android.events.StatusCountersUpdatedEvent;
|
||||
import org.joinmastodon.android.model.Status;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.function.Consumer;
|
||||
|
||||
import me.grishka.appkit.api.Callback;
|
||||
import me.grishka.appkit.api.ErrorResponse;
|
||||
@@ -25,7 +26,7 @@ public class StatusInteractionController{
|
||||
this.accountID=accountID;
|
||||
}
|
||||
|
||||
public void setFavorited(Status status, boolean favorited){
|
||||
public void setFavorited(Status status, boolean favorited, Consumer<Status> cb){
|
||||
if(!Looper.getMainLooper().isCurrentThread())
|
||||
throw new IllegalStateException("Can only be called from main thread");
|
||||
|
||||
@@ -38,6 +39,8 @@ public class StatusInteractionController{
|
||||
@Override
|
||||
public void onSuccess(Status result){
|
||||
runningFavoriteRequests.remove(status.id);
|
||||
result.favouritesCount = Math.max(0, status.favouritesCount) + (favorited ? 1 : -1);
|
||||
cb.accept(result);
|
||||
E.post(new StatusCountersUpdatedEvent(result));
|
||||
}
|
||||
|
||||
@@ -46,24 +49,17 @@ public class StatusInteractionController{
|
||||
runningFavoriteRequests.remove(status.id);
|
||||
error.showToast(MastodonApp.context);
|
||||
status.favourited=!favorited;
|
||||
if(favorited)
|
||||
status.favouritesCount--;
|
||||
else
|
||||
status.favouritesCount++;
|
||||
cb.accept(status);
|
||||
E.post(new StatusCountersUpdatedEvent(status));
|
||||
}
|
||||
})
|
||||
.exec(accountID);
|
||||
runningFavoriteRequests.put(status.id, req);
|
||||
status.favourited=favorited;
|
||||
if(favorited)
|
||||
status.favouritesCount++;
|
||||
else
|
||||
status.favouritesCount--;
|
||||
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())
|
||||
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)
|
||||
.setCallback(new Callback<>(){
|
||||
@Override
|
||||
public void onSuccess(Status result){
|
||||
public void onSuccess(Status reblog){
|
||||
Status result = reblog.getContentStatus();
|
||||
runningReblogRequests.remove(status.id);
|
||||
result.reblogsCount = Math.max(0, status.reblogsCount) + (reblogged ? 1 : -1);
|
||||
cb.accept(result);
|
||||
E.post(new StatusCountersUpdatedEvent(result));
|
||||
}
|
||||
|
||||
@@ -84,24 +83,21 @@ public class StatusInteractionController{
|
||||
runningReblogRequests.remove(status.id);
|
||||
error.showToast(MastodonApp.context);
|
||||
status.reblogged=!reblogged;
|
||||
if(reblogged)
|
||||
status.reblogsCount--;
|
||||
else
|
||||
status.reblogsCount++;
|
||||
cb.accept(status);
|
||||
E.post(new StatusCountersUpdatedEvent(status));
|
||||
}
|
||||
})
|
||||
.exec(accountID);
|
||||
runningReblogRequests.put(status.id, req);
|
||||
status.reblogged=reblogged;
|
||||
if(reblogged)
|
||||
status.reblogsCount++;
|
||||
else
|
||||
status.reblogsCount--;
|
||||
E.post(new StatusCountersUpdatedEvent(status));
|
||||
}
|
||||
|
||||
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())
|
||||
throw new IllegalStateException("Can only be called from main thread");
|
||||
|
||||
@@ -114,6 +110,7 @@ public class StatusInteractionController{
|
||||
@Override
|
||||
public void onSuccess(Status result){
|
||||
runningBookmarkRequests.remove(status.id);
|
||||
cb.accept(result);
|
||||
E.post(new StatusCountersUpdatedEvent(result));
|
||||
}
|
||||
|
||||
@@ -122,6 +119,7 @@ public class StatusInteractionController{
|
||||
runningBookmarkRequests.remove(status.id);
|
||||
error.showToast(MastodonApp.context);
|
||||
status.bookmarked=!bookmarked;
|
||||
cb.accept(status);
|
||||
E.post(new StatusCountersUpdatedEvent(status));
|
||||
}
|
||||
})
|
||||
|
||||
@@ -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{
|
||||
}
|
||||
}
|
||||
@@ -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());
|
||||
}
|
||||
}
|
||||
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -104,6 +104,7 @@ public class AccountSessionManager{
|
||||
|
||||
public void addAccount(Instance instance, Token token, Account self, Application app, AccountActivationInfo activationInfo){
|
||||
instances.put(instance.uri, instance);
|
||||
updateInstanceInfoV2(instance);
|
||||
AccountSession session=new AccountSession(token, self, app, instance.uri, activationInfo==null, activationInfo);
|
||||
sessions.put(session.getID(), session);
|
||||
lastActiveAccountID=session.getID();
|
||||
@@ -329,9 +330,7 @@ public class AccountSessionManager{
|
||||
instances.put(domain, instance);
|
||||
updateInstanceEmojis(instance, domain);
|
||||
try {
|
||||
if (Integer.parseInt(instance.version.split("\\.")[0]) >= 4) {
|
||||
updateInstanceInfoV2(domain);
|
||||
}
|
||||
updateInstanceInfoV2(instance);
|
||||
} catch (Exception ignored) {}
|
||||
}
|
||||
|
||||
@@ -343,17 +342,17 @@ public class AccountSessionManager{
|
||||
.execNoAuth(domain);
|
||||
}
|
||||
|
||||
public void updateInstanceInfoV2(String domain) {
|
||||
public void updateInstanceInfoV2(Instance instance) {
|
||||
new GetInstance.V2().setCallback(new Callback<>() {
|
||||
@Override
|
||||
public void onSuccess(Instance.V2 v2) {
|
||||
Instance instanceInfo = instances.get(domain);
|
||||
if (instanceInfo != null) instanceInfo.v2 = v2;
|
||||
if (instance != null) instance.v2 = v2;
|
||||
writeAccountsFile();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(ErrorResponse errorResponse) {}
|
||||
}).execNoAuth(domain);
|
||||
}).execNoAuth(instance.uri);
|
||||
}
|
||||
|
||||
private void updateInstanceEmojis(Instance instance, String domain){
|
||||
|
||||
@@ -462,21 +462,6 @@ public abstract class BaseStatusListFragment<T extends DisplayItemsParent> exten
|
||||
Status status=holder.getItem().status;
|
||||
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){
|
||||
status.spoilerRevealed=true;
|
||||
@@ -802,7 +787,7 @@ public abstract class BaseStatusListFragment<T extends DisplayItemsParent> exten
|
||||
currentMediaHiddenLayoutsWidth=width;
|
||||
String title=getString(R.string.sensitive_content);
|
||||
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.setTypeface(mediumTypeface);
|
||||
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)
|
||||
.build();
|
||||
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));
|
||||
String text=getString(R.string.sensitive_content_explain);
|
||||
mediaHiddenTextLayout=StaticLayout.Builder.obtain(text, 0, text.length(), textPaint, width)
|
||||
|
||||
@@ -155,7 +155,7 @@ public class ComposeFragment extends MastodonToolbarFragment implements OnBackPr
|
||||
private int charCount, charLimit, trimmedCharCount;
|
||||
|
||||
private Button publishButton, languageButton;
|
||||
private PopupMenu languagePopup;
|
||||
private PopupMenu languagePopup, visibilityPopup;
|
||||
private ImageButton mediaBtn, pollBtn, emojiBtn, spoilerBtn, visibilityBtn;
|
||||
private ImageView sensitiveIcon;
|
||||
private ComposeMediaLayout attachmentsView;
|
||||
@@ -203,10 +203,14 @@ public class ComposeFragment extends MastodonToolbarFragment implements OnBackPr
|
||||
private String language;
|
||||
private MastodonLanguage.LanguageResolver languageResolver;
|
||||
|
||||
private int navigationBarColorBefore;
|
||||
|
||||
@Override
|
||||
public void onCreate(Bundle savedInstanceState){
|
||||
super.onCreate(savedInstanceState);
|
||||
setRetainInstance(true);
|
||||
navigationBarColorBefore = getActivity().getWindow().getNavigationBarColor();
|
||||
getActivity().getWindow().setNavigationBarColor(UiUtils.getThemeColor(getActivity(), R.attr.colorBackgroundLightest));
|
||||
|
||||
accountID=getArguments().getString("account");
|
||||
AccountSession session=AccountSessionManager.getInstance().getAccount(accountID);
|
||||
@@ -233,6 +237,8 @@ public class ComposeFragment extends MastodonToolbarFragment implements OnBackPr
|
||||
charLimit=instance.configuration.statuses.maxCharacters;
|
||||
else
|
||||
charLimit=500;
|
||||
|
||||
if (editingStatus == null) loadDefaultStatusVisibility(savedInstanceState);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -246,6 +252,7 @@ public class ComposeFragment extends MastodonToolbarFragment implements OnBackPr
|
||||
UiUtils.removeCallbacks(updateUploadEtaRunnable);
|
||||
updateUploadEtaRunnable=null;
|
||||
}
|
||||
getActivity().getWindow().setNavigationBarColor(navigationBarColorBefore);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -255,6 +262,7 @@ public class ComposeFragment extends MastodonToolbarFragment implements OnBackPr
|
||||
wm=activity.getSystemService(WindowManager.class);
|
||||
}
|
||||
|
||||
@SuppressLint("ClickableViewAccessibility")
|
||||
@Override
|
||||
public View onCreateContentView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState){
|
||||
creatingView=true;
|
||||
@@ -295,7 +303,9 @@ public class ComposeFragment extends MastodonToolbarFragment implements OnBackPr
|
||||
pollBtn.setOnClickListener(v->togglePoll());
|
||||
emojiBtn.setOnClickListener(v->emojiKeyboard.toggleKeyboardPopup(mainEditText));
|
||||
spoilerBtn.setOnClickListener(v->toggleSpoiler());
|
||||
visibilityBtn.setOnClickListener(this::onVisibilityClick);
|
||||
buildVisibilityPopup(visibilityBtn);
|
||||
visibilityBtn.setOnClickListener(v->visibilityPopup.show());
|
||||
visibilityBtn.setOnTouchListener(visibilityPopup.getDragToOpenListener());
|
||||
sensitiveItem.setOnClickListener(v->toggleSensitive());
|
||||
emojiKeyboard.setOnIconChangedListener(new PopupKeyboard.OnIconChangeListener(){
|
||||
@Override
|
||||
@@ -389,6 +399,12 @@ public class ComposeFragment extends MastodonToolbarFragment implements OnBackPr
|
||||
|
||||
loadDefaultStatusVisibility(savedInstanceState);
|
||||
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.setCompletionSelectedListener(this::onAutocompleteOptionSelected);
|
||||
@@ -592,6 +608,11 @@ public class ComposeFragment extends MastodonToolbarFragment implements OnBackPr
|
||||
ignoreSelectionChanges=false;
|
||||
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");
|
||||
if(mediaUris!=null && !mediaUris.isEmpty()){
|
||||
for(Uri uri:mediaUris){
|
||||
@@ -1396,19 +1417,13 @@ public class ComposeFragment extends MastodonToolbarFragment implements OnBackPr
|
||||
return attachments.size();
|
||||
}
|
||||
|
||||
private void onVisibilityClick(View v){
|
||||
PopupMenu menu=new PopupMenu(getActivity(), v);
|
||||
menu.inflate(R.menu.compose_visibility);
|
||||
Menu m=menu.getMenu();
|
||||
UiUtils.enablePopupMenuIcons(getActivity(), menu);
|
||||
private void buildVisibilityPopup(View v){
|
||||
visibilityPopup=new PopupMenu(getActivity(), v);
|
||||
visibilityPopup.inflate(R.menu.compose_visibility);
|
||||
Menu m=visibilityPopup.getMenu();
|
||||
UiUtils.enablePopupMenuIcons(getActivity(), visibilityPopup);
|
||||
m.setGroupCheckable(0, true, true);
|
||||
m.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);
|
||||
menu.setOnMenuItemClickListener(new PopupMenu.OnMenuItemClickListener(){
|
||||
visibilityPopup.setOnMenuItemClickListener(new PopupMenu.OnMenuItemClickListener(){
|
||||
@Override
|
||||
public boolean onMenuItemClick(MenuItem item){
|
||||
int id=item.getItemId();
|
||||
@@ -1426,7 +1441,6 @@ public class ComposeFragment extends MastodonToolbarFragment implements OnBackPr
|
||||
return true;
|
||||
}
|
||||
});
|
||||
menu.show();
|
||||
}
|
||||
|
||||
private void loadDefaultStatusVisibility(Bundle savedInstanceState) {
|
||||
|
||||
@@ -302,7 +302,7 @@ public class FollowRequestsListFragment extends BaseRecyclerFragment<FollowReque
|
||||
RecyclerView.Adapter<? extends RecyclerView.ViewHolder> adapter = getBindingAdapter();
|
||||
if (!rel.requested && !rel.followedBy && adapter != null) {
|
||||
data.remove(item);
|
||||
adapter.notifyItemRemoved(getBindingAdapterPosition());
|
||||
adapter.notifyItemRemoved(getLayoutPosition());
|
||||
} else {
|
||||
rebind();
|
||||
}
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,14 +1,9 @@
|
||||
package org.joinmastodon.android.fragments;
|
||||
|
||||
import android.os.Bundle;
|
||||
import android.view.Menu;
|
||||
import android.view.MenuInflater;
|
||||
import android.view.MenuItem;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.Button;
|
||||
import android.widget.CheckBox;
|
||||
import android.widget.LinearLayout;
|
||||
import android.widget.TextView;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
@@ -23,17 +18,13 @@ import org.joinmastodon.android.model.ListTimeline;
|
||||
import org.joinmastodon.android.ui.utils.UiUtils;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.Collections;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import me.grishka.appkit.api.ErrorResponse;
|
||||
import me.grishka.appkit.api.SimpleCallback;
|
||||
import me.grishka.appkit.fragments.BaseRecyclerFragment;
|
||||
import me.grishka.appkit.utils.BindableViewHolder;
|
||||
import me.grishka.appkit.utils.V;
|
||||
import me.grishka.appkit.views.UsableRecyclerView;
|
||||
|
||||
public class ListTimelinesFragment extends BaseRecyclerFragment<ListTimeline> implements ScrollableToTop {
|
||||
@@ -159,7 +150,7 @@ public class ListTimelinesFragment extends BaseRecyclerFragment<ListTimeline> im
|
||||
private final CheckBox listToggle;
|
||||
|
||||
public ListViewHolder(){
|
||||
super(getActivity(), R.layout.item_list_timeline, list);
|
||||
super(getActivity(), R.layout.item_text, list);
|
||||
title=findViewById(R.id.title);
|
||||
listToggle=findViewById(R.id.list_toggle);
|
||||
}
|
||||
@@ -167,8 +158,10 @@ public class ListTimelinesFragment extends BaseRecyclerFragment<ListTimeline> im
|
||||
@Override
|
||||
public void onBind(ListTimeline item) {
|
||||
title.setText(item.title);
|
||||
title.setCompoundDrawablesRelativeWithIntrinsicBounds(itemView.getContext().getDrawable(R.drawable.ic_fluent_people_community_24_regular), null, null, null);
|
||||
if (profileAccountId != null) {
|
||||
Boolean checked = userInList.get(item.id);
|
||||
listToggle.setVisibility(View.VISIBLE);
|
||||
listToggle.setChecked(userInList.containsKey(item.id) && checked != null && checked);
|
||||
listToggle.setOnClickListener(this::onClickToggle);
|
||||
} else {
|
||||
|
||||
@@ -14,6 +14,7 @@ import android.widget.FrameLayout;
|
||||
import android.widget.LinearLayout;
|
||||
|
||||
import org.joinmastodon.android.E;
|
||||
import org.joinmastodon.android.GlobalUserPreferences;
|
||||
import org.joinmastodon.android.R;
|
||||
import org.joinmastodon.android.api.requests.accounts.GetFollowRequests;
|
||||
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));
|
||||
|
||||
pager.setOffscreenPageLimit(4);
|
||||
pager.setUserInputEnabled(!GlobalUserPreferences.disableSwipe);
|
||||
pager.setAdapter(new DiscoverPagerAdapter());
|
||||
pager.registerOnPageChangeCallback(new ViewPager2.OnPageChangeCallback(){
|
||||
@Override
|
||||
|
||||
@@ -10,6 +10,7 @@ import android.app.Activity;
|
||||
import android.app.Fragment;
|
||||
import android.content.ClipData;
|
||||
import android.content.ClipboardManager;
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.content.res.Configuration;
|
||||
import android.graphics.Outline;
|
||||
@@ -18,6 +19,8 @@ import android.graphics.drawable.Drawable;
|
||||
import android.net.Uri;
|
||||
import android.os.Build;
|
||||
import android.os.Bundle;
|
||||
import android.os.VibrationEffect;
|
||||
import android.os.Vibrator;
|
||||
import android.text.SpannableStringBuilder;
|
||||
import android.text.TextUtils;
|
||||
import android.text.style.ImageSpan;
|
||||
@@ -234,6 +237,7 @@ public class ProfileFragment extends LoaderFragment implements OnBackPressedList
|
||||
}
|
||||
|
||||
pager.setOffscreenPageLimit(5);
|
||||
pager.setUserInputEnabled(!GlobalUserPreferences.disableSwipe);
|
||||
pager.setAdapter(new ProfilePagerAdapter());
|
||||
pager.getLayoutParams().height=getResources().getDisplayMetrics().heightPixels;
|
||||
|
||||
@@ -288,10 +292,7 @@ public class ProfileFragment extends LoaderFragment implements OnBackPressedList
|
||||
if(!username.contains("@")){
|
||||
username+="@"+AccountSessionManager.getInstance().getAccount(accountID).domain;
|
||||
}
|
||||
getActivity().getSystemService(ClipboardManager.class).setPrimaryClip(ClipData.newPlainText(null, "@"+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();
|
||||
}
|
||||
UiUtils.copyText(getActivity(), '@'+username);
|
||||
return true;
|
||||
});
|
||||
|
||||
@@ -623,6 +624,10 @@ public class ProfileFragment extends LoaderFragment implements OnBackPressedList
|
||||
args.putString("profileAccount", profileAccountID);
|
||||
args.putString("profileDisplayUsername", account.getDisplayUsername());
|
||||
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;
|
||||
}
|
||||
|
||||
@@ -11,12 +11,15 @@ import android.os.Build;
|
||||
import android.os.Bundle;
|
||||
import android.view.Gravity;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.MenuItem;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.view.WindowInsets;
|
||||
import android.view.WindowManager;
|
||||
import android.view.animation.LinearInterpolator;
|
||||
import android.widget.Button;
|
||||
import android.widget.EditText;
|
||||
import android.widget.FrameLayout;
|
||||
import android.widget.ImageButton;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.PopupMenu;
|
||||
@@ -31,6 +34,7 @@ import com.squareup.otto.Subscribe;
|
||||
import org.joinmastodon.android.BuildConfig;
|
||||
import org.joinmastodon.android.E;
|
||||
import org.joinmastodon.android.GlobalUserPreferences;
|
||||
import org.joinmastodon.android.GlobalUserPreferences.ColorPreference;
|
||||
import org.joinmastodon.android.MainActivity;
|
||||
import org.joinmastodon.android.MastodonApp;
|
||||
import org.joinmastodon.android.R;
|
||||
@@ -96,11 +100,29 @@ public class SettingsFragment extends MastodonToolbarFragment{
|
||||
items.add(new HeaderItem(R.string.settings_theme));
|
||||
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.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.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 SwitchItem(R.string.settings_gif, R.drawable.ic_fluent_gif_24_regular, GlobalUserPreferences.playGifs, i->{
|
||||
@@ -115,10 +137,15 @@ public class SettingsFragment extends MastodonToolbarFragment{
|
||||
GlobalUserPreferences.showInteractionCounts=i.checked;
|
||||
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.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 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->{
|
||||
@@ -158,15 +185,15 @@ public class SettingsFragment extends MastodonToolbarFragment{
|
||||
checkForUpdateItem = new TextItem(R.string.sk_check_for_update, GithubSelfUpdater.getInstance()::checkForUpdates);
|
||||
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.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.save();
|
||||
})));
|
||||
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
|
||||
@@ -241,13 +268,29 @@ public class SettingsFragment extends MastodonToolbarFragment{
|
||||
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();
|
||||
restartActivityToApplyNewTheme();
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
private void onTrueBlackThemeChanged(SwitchItem item){
|
||||
GlobalUserPreferences.trueBlackTheme=item.checked;
|
||||
GlobalUserPreferences.save();
|
||||
@@ -451,6 +494,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{
|
||||
@Override
|
||||
public int getViewType(){
|
||||
@@ -542,7 +602,7 @@ public class SettingsFragment extends MastodonToolbarFragment{
|
||||
case 5 -> new HeaderViewHolder(true);
|
||||
case 6 -> new FooterViewHolder();
|
||||
case 7 -> new UpdateViewHolder();
|
||||
case 8 -> new ColorPickerViewHolder();
|
||||
case 8 -> new ButtonViewHolder();
|
||||
default -> throw new IllegalStateException("Unexpected value: "+viewType);
|
||||
};
|
||||
}
|
||||
@@ -671,75 +731,25 @@ public class SettingsFragment extends MastodonToolbarFragment{
|
||||
}
|
||||
}
|
||||
}
|
||||
private class ColorPickerViewHolder extends BindableViewHolder<ColorPicker>{
|
||||
|
||||
private class ButtonViewHolder extends BindableViewHolder<ButtonItem>{
|
||||
private final Button button;
|
||||
private final PopupMenu popupMenu;
|
||||
private final ImageView icon;
|
||||
private final TextView text;
|
||||
|
||||
@SuppressLint("ClickableViewAccessibility")
|
||||
public ColorPickerViewHolder(){
|
||||
super(getActivity(), R.layout.item_settings_color_picker, list);
|
||||
public ButtonViewHolder(){
|
||||
super(getActivity(), R.layout.item_settings_button, list);
|
||||
text=findViewById(R.id.text);
|
||||
icon=findViewById(R.id.icon);
|
||||
button=findViewById(R.id.color_picker_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());
|
||||
button=findViewById(R.id.button);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onBind(ColorPicker item){
|
||||
icon.setImageResource(R.drawable.ic_color_theme_preference);
|
||||
button.setText(switch(GlobalUserPreferences.color){
|
||||
case PINK -> R.string.sk_color_theme_pink;
|
||||
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;
|
||||
});
|
||||
public void onBind(ButtonItem item){
|
||||
text.setText(item.text);
|
||||
icon.setImageResource(item.icon);
|
||||
item.buttonConsumer.accept(button);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -858,10 +868,10 @@ public class SettingsFragment extends MastodonToolbarFragment{
|
||||
if (state == GithubSelfUpdater.UpdateState.CHECKING) return;
|
||||
GithubSelfUpdater.UpdateInfo info=updater.getUpdateInfo();
|
||||
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)));
|
||||
}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);
|
||||
}
|
||||
if(state==GithubSelfUpdater.UpdateState.DOWNLOADING){
|
||||
|
||||
@@ -177,7 +177,7 @@ public abstract class StatusListFragment extends BaseStatusListFragment<Status>{
|
||||
public void onStatusCountersUpdated(StatusCountersUpdatedEvent ev){
|
||||
for(Status s:data){
|
||||
if(s.getContentStatus().id.equals(ev.id)){
|
||||
s.update(ev);
|
||||
s.getContentStatus().update(ev);
|
||||
for(int i=0;i<list.getChildCount();i++){
|
||||
RecyclerView.ViewHolder holder=list.getChildViewHolder(list.getChildAt(i));
|
||||
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){
|
||||
if(s.id.equals(ev.id)){
|
||||
s.update(ev);
|
||||
if(s.getContentStatus().id.equals(ev.id)){
|
||||
s.getContentStatus().update(ev);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -23,6 +23,7 @@ import org.joinmastodon.android.R;
|
||||
import org.joinmastodon.android.api.requests.accounts.GetAccountRelationships;
|
||||
import org.joinmastodon.android.api.requests.accounts.SetAccountFollowed;
|
||||
import org.joinmastodon.android.api.session.AccountSessionManager;
|
||||
import org.joinmastodon.android.fragments.ListTimelinesFragment;
|
||||
import org.joinmastodon.android.fragments.ProfileFragment;
|
||||
import org.joinmastodon.android.fragments.report.ReportReasonChoiceFragment;
|
||||
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.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.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 manageUserLists=menu.findItem(R.id.manage_user_lists);
|
||||
if(relationship.following){
|
||||
@@ -372,6 +374,12 @@ public abstract class BaseAccountListFragment extends BaseRecyclerFragment<BaseA
|
||||
})
|
||||
.wrapProgress(getActivity(), R.string.loading, false)
|
||||
.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;
|
||||
}
|
||||
|
||||
@@ -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));
|
||||
|
||||
pager.setOffscreenPageLimit(4);
|
||||
pager.setUserInputEnabled(!GlobalUserPreferences.disableSwipe);
|
||||
pager.setAdapter(new DiscoverPagerAdapter());
|
||||
pager.registerOnPageChangeCallback(new ViewPager2.OnPageChangeCallback(){
|
||||
@Override
|
||||
|
||||
@@ -36,11 +36,11 @@ import me.grishka.appkit.utils.SingleViewRecyclerAdapter;
|
||||
import me.grishka.appkit.utils.V;
|
||||
import me.grishka.appkit.views.UsableRecyclerView;
|
||||
|
||||
public class MoshidonLoginFragment extends InstanceCatalogFragment {
|
||||
public class CustomLoginFragment extends InstanceCatalogFragment {
|
||||
private View headerView;
|
||||
|
||||
public MoshidonLoginFragment() {
|
||||
super(R.layout.fragment_moshidon_welcome, 1);
|
||||
public CustomLoginFragment() {
|
||||
super(R.layout.fragment_welcome_custom, 1);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -131,7 +131,7 @@ public class MoshidonLoginFragment extends InstanceCatalogFragment {
|
||||
|
||||
@Override
|
||||
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.setOnEditorActionListener(this::onSearchEnterPressed);
|
||||
|
||||
@@ -203,7 +203,7 @@ public class MoshidonLoginFragment extends InstanceCatalogFragment {
|
||||
private final RadioButton radioButton;
|
||||
|
||||
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));
|
||||
// TypedValue value = new TypedValue();
|
||||
@@ -155,7 +155,7 @@ public class SignupFragment extends ToolbarFragment{
|
||||
}
|
||||
|
||||
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));
|
||||
passwordConfirmWrap.setErrorState();
|
||||
return;
|
||||
|
||||
@@ -50,6 +50,7 @@ public class Status extends BaseModel implements DisplayItemsParent{
|
||||
public Card card;
|
||||
public String language;
|
||||
public String text;
|
||||
public String translation;
|
||||
|
||||
public boolean favourited;
|
||||
public boolean reblogged;
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
package org.joinmastodon.android.model;
|
||||
|
||||
public class TranslatedStatus extends BaseModel {
|
||||
public String content;
|
||||
public String detectedSourceLanguage;
|
||||
public String provider;
|
||||
}
|
||||
@@ -23,7 +23,7 @@ import org.joinmastodon.android.R;
|
||||
import org.joinmastodon.android.api.requests.oauth.RevokeOauthToken;
|
||||
import org.joinmastodon.android.api.session.AccountSession;
|
||||
import org.joinmastodon.android.api.session.AccountSessionManager;
|
||||
import org.joinmastodon.android.fragments.onboarding.MoshidonLoginFragment;
|
||||
import org.joinmastodon.android.fragments.onboarding.CustomLoginFragment;
|
||||
import org.joinmastodon.android.ui.utils.UiUtils;
|
||||
|
||||
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.setImageTintList(ColorStateList.valueOf(UiUtils.getThemeColor(activity, android.R.attr.textColorPrimary)));
|
||||
adapter.addAdapter(new ClickableSingleViewRecyclerAdapter(holder.itemView, ()->{
|
||||
Nav.go(activity, MoshidonLoginFragment.class, null);
|
||||
Nav.go(activity, CustomLoginFragment.class, null);
|
||||
dismiss();
|
||||
}));
|
||||
|
||||
|
||||
@@ -12,6 +12,8 @@ import android.widget.ImageView;
|
||||
import android.widget.ProgressBar;
|
||||
import android.widget.TextView;
|
||||
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
|
||||
import org.joinmastodon.android.R;
|
||||
import org.joinmastodon.android.fragments.BaseStatusListFragment;
|
||||
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.views.ProgressBarButton;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
import me.grishka.appkit.imageloader.ImageLoaderViewHolder;
|
||||
import me.grishka.appkit.imageloader.requests.ImageLoaderRequest;
|
||||
@@ -154,10 +158,18 @@ public class AccountCardStatusDisplayItem extends StatusDisplayItem{
|
||||
|
||||
private void onFollowRequestButtonClick(View v) {
|
||||
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);
|
||||
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();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -4,10 +4,15 @@ import android.app.Activity;
|
||||
import android.content.Intent;
|
||||
import android.os.Build;
|
||||
import android.os.Bundle;
|
||||
import android.view.MotionEvent;
|
||||
import android.view.View;
|
||||
import android.view.ViewConfiguration;
|
||||
import android.view.ViewGroup;
|
||||
import android.view.accessibility.AccessibilityNodeInfo;
|
||||
import android.view.animation.AlphaAnimation;
|
||||
import android.view.animation.Animation;
|
||||
import android.widget.Button;
|
||||
import android.widget.FrameLayout;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.TextView;
|
||||
|
||||
@@ -21,10 +26,8 @@ import org.joinmastodon.android.model.StatusPrivacy;
|
||||
import org.joinmastodon.android.ui.utils.UiUtils;
|
||||
import org.parceler.Parcels;
|
||||
|
||||
import java.text.DecimalFormat;
|
||||
|
||||
import me.grishka.appkit.Nav;
|
||||
import me.grishka.appkit.utils.BindableViewHolder;
|
||||
import me.grishka.appkit.utils.CubicBezierInterpolator;
|
||||
import me.grishka.appkit.utils.V;
|
||||
|
||||
public class FooterStatusDisplayItem extends StatusDisplayItem{
|
||||
@@ -46,6 +49,10 @@ public class FooterStatusDisplayItem extends StatusDisplayItem{
|
||||
public static class Holder extends StatusDisplayItem.Holder<FooterStatusDisplayItem>{
|
||||
private final TextView reply, boost, favorite, bookmark;
|
||||
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(){
|
||||
@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){
|
||||
super(activity, R.layout.display_item_footer, parent);
|
||||
reply=findViewById(R.id.reply);
|
||||
@@ -74,15 +91,22 @@ public class FooterStatusDisplayItem extends StatusDisplayItem{
|
||||
View favorite=findViewById(R.id.favorite_btn);
|
||||
View share=findViewById(R.id.share_btn);
|
||||
View bookmark=findViewById(R.id.bookmark_btn);
|
||||
reply.setOnTouchListener(this::onButtonTouch);
|
||||
reply.setOnClickListener(this::onReplyClick);
|
||||
reply.setAccessibilityDelegate(buttonAccessibilityDelegate);
|
||||
boost.setOnTouchListener(this::onButtonTouch);
|
||||
boost.setOnClickListener(this::onBoostClick);
|
||||
boost.setOnLongClickListener(this::onBoostLongClick);
|
||||
boost.setAccessibilityDelegate(buttonAccessibilityDelegate);
|
||||
favorite.setOnTouchListener(this::onButtonTouch);
|
||||
favorite.setOnClickListener(this::onFavoriteClick);
|
||||
favorite.setAccessibilityDelegate(buttonAccessibilityDelegate);
|
||||
bookmark.setOnTouchListener(this::onButtonTouch);
|
||||
bookmark.setOnClickListener(this::onBookmarkClick);
|
||||
bookmark.setAccessibilityDelegate(buttonAccessibilityDelegate);
|
||||
share.setOnTouchListener(this::onButtonTouch);
|
||||
share.setOnClickListener(this::onShareClick);
|
||||
share.setOnLongClickListener(this::onShareLongClick);
|
||||
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){
|
||||
v.startAnimation(opacityIn);
|
||||
Bundle args=new Bundle();
|
||||
args.putString("account", item.accountID);
|
||||
args.putParcelable("replyTo", Parcels.wrap(item.status));
|
||||
@@ -116,29 +165,53 @@ public class FooterStatusDisplayItem extends StatusDisplayItem{
|
||||
}
|
||||
|
||||
private void onBoostClick(View v){
|
||||
AccountSessionManager.getInstance().getAccount(item.accountID).getStatusInteractionController().setReblogged(item.status, !item.status.reblogged);
|
||||
boost.setSelected(item.status.reblogged);
|
||||
bindButton(boost, item.status.reblogsCount);
|
||||
boost.setSelected(!item.status.reblogged);
|
||||
AccountSessionManager.getInstance().getAccount(item.accountID).getStatusInteractionController().setReblogged(item.status, !item.status.reblogged, r->{
|
||||
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){
|
||||
AccountSessionManager.getInstance().getAccount(item.accountID).getStatusInteractionController().setFavorited(item.status, !item.status.favourited);
|
||||
favorite.setSelected(item.status.favourited);
|
||||
bindButton(favorite, item.status.favouritesCount);
|
||||
favorite.setSelected(!item.status.favourited);
|
||||
AccountSessionManager.getInstance().getAccount(item.accountID).getStatusInteractionController().setFavorited(item.status, !item.status.favourited, r->{
|
||||
v.startAnimation(opacityIn);
|
||||
bindButton(favorite, r.favouritesCount);
|
||||
});
|
||||
}
|
||||
|
||||
private void onBookmarkClick(View v){
|
||||
AccountSessionManager.getInstance().getAccount(item.accountID).getStatusInteractionController().setBookmarked(item.status, !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){
|
||||
v.startAnimation(opacityIn);
|
||||
Intent intent=new Intent(Intent.ACTION_SEND);
|
||||
intent.setType("text/plain");
|
||||
intent.putExtra(Intent.EXTRA_TEXT, item.status.url);
|
||||
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){
|
||||
if(id==R.id.reply_btn)
|
||||
return R.string.button_reply;
|
||||
|
||||
@@ -23,7 +23,6 @@ import org.joinmastodon.android.GlobalUserPreferences;
|
||||
import org.joinmastodon.android.R;
|
||||
import org.joinmastodon.android.api.requests.accounts.GetAccountRelationships;
|
||||
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.fragments.BaseStatusListFragment;
|
||||
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.model.Account;
|
||||
import org.joinmastodon.android.model.Attachment;
|
||||
import org.joinmastodon.android.model.Preferences;
|
||||
import org.joinmastodon.android.model.Relationship;
|
||||
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.utils.CustomEmojiHelper;
|
||||
import org.joinmastodon.android.ui.utils.UiUtils;
|
||||
@@ -43,6 +43,7 @@ import org.parceler.Parcels;
|
||||
import java.time.Instant;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
import java.util.Objects;
|
||||
|
||||
import me.grishka.appkit.Nav;
|
||||
import me.grishka.appkit.api.APIRequest;
|
||||
@@ -62,7 +63,6 @@ public class HeaderStatusDisplayItem extends StatusDisplayItem{
|
||||
private SpannableStringBuilder parsedName;
|
||||
public final Status status;
|
||||
private boolean hasVisibilityToggle;
|
||||
private boolean hasTranslateToggle;
|
||||
boolean needBottomPadding;
|
||||
private String extraText;
|
||||
|
||||
@@ -77,7 +77,6 @@ public class HeaderStatusDisplayItem extends StatusDisplayItem{
|
||||
HtmlParser.parseCustomEmoji(parsedName, user.emojis);
|
||||
emojiHelper.setText(parsedName);
|
||||
if(status!=null){
|
||||
hasTranslateToggle=true;
|
||||
hasVisibilityToggle=status.sensitive || !TextUtils.isEmpty(status.spoilerText);
|
||||
if(!hasVisibilityToggle && !status.mediaAttachments.isEmpty()){
|
||||
for(Attachment att:status.mediaAttachments){
|
||||
@@ -111,7 +110,7 @@ public class HeaderStatusDisplayItem extends StatusDisplayItem{
|
||||
|
||||
public static class Holder extends StatusDisplayItem.Holder<HeaderStatusDisplayItem> implements ImageLoaderViewHolder{
|
||||
private final TextView name, username, timestamp, extraText;
|
||||
private final ImageView avatar, more, visibility, translate;
|
||||
private final ImageView avatar, more, visibility;
|
||||
private final PopupMenu optionsMenu;
|
||||
private Relationship relationship;
|
||||
private APIRequest<?> currentRelationshipRequest;
|
||||
@@ -125,7 +124,6 @@ public class HeaderStatusDisplayItem extends StatusDisplayItem{
|
||||
|
||||
public Holder(Activity activity, ViewGroup parent){
|
||||
super(activity, R.layout.display_item_header, parent);
|
||||
translate=findViewById(R.id.translate);
|
||||
name=findViewById(R.id.name);
|
||||
username=findViewById(R.id.username);
|
||||
timestamp=findViewById(R.id.timestamp);
|
||||
@@ -138,7 +136,6 @@ public class HeaderStatusDisplayItem extends StatusDisplayItem{
|
||||
avatar.setClipToOutline(true);
|
||||
more.setOnClickListener(this::onMoreClick);
|
||||
visibility.setOnClickListener(v->item.parentFragment.onVisibilityIconClick(this));
|
||||
translate.setOnClickListener(v->item.parentFragment.onRevealTranslationClick(this));
|
||||
|
||||
optionsMenu=new PopupMenu(activity, more);
|
||||
optionsMenu.inflate(R.menu.post);
|
||||
@@ -232,7 +229,6 @@ public class HeaderStatusDisplayItem extends StatusDisplayItem{
|
||||
else
|
||||
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);
|
||||
translate.setVisibility(item.hasTranslateToggle ? View.VISIBLE : View.GONE);
|
||||
if(item.hasVisibilityToggle){
|
||||
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));
|
||||
@@ -240,9 +236,6 @@ public class HeaderStatusDisplayItem extends StatusDisplayItem{
|
||||
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);
|
||||
if(TextUtils.isEmpty(item.extraText)){
|
||||
extraText.setVisibility(View.GONE);
|
||||
|
||||
@@ -95,7 +95,7 @@ public class LinkCardStatusDisplayItem extends StatusDisplayItem{
|
||||
}
|
||||
|
||||
private void onClick(View v){
|
||||
UiUtils.launchWebBrowser(itemView.getContext(), item.status.card.url);
|
||||
UiUtils.openURL(itemView.getContext(), item.parentFragment.getAccountID(), item.status.card.url);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -8,16 +8,20 @@ import android.text.TextUtils;
|
||||
import android.util.TypedValue;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.Button;
|
||||
import android.widget.LinearLayout;
|
||||
import android.widget.Button;
|
||||
import android.widget.TextView;
|
||||
|
||||
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.model.Instance;
|
||||
import org.joinmastodon.android.model.Status;
|
||||
import org.joinmastodon.android.model.StatusTranslation;
|
||||
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.utils.CustomEmojiHelper;
|
||||
import org.joinmastodon.android.ui.views.LinkedTextView;
|
||||
@@ -35,18 +39,21 @@ public class TextStatusDisplayItem extends StatusDisplayItem{
|
||||
private CharSequence parsedSpoilerText;
|
||||
public boolean textSelectable;
|
||||
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){
|
||||
super(parentID, parentFragment);
|
||||
this.text=text;
|
||||
this.status=status;
|
||||
// this.wantsTranslation=wantsTranslation;
|
||||
emojiHelper.setText(text);
|
||||
if(!TextUtils.isEmpty(status.spoilerText)){
|
||||
parsedSpoilerText=HtmlParser.parseCustomEmoji(status.spoilerText, status.emojis);
|
||||
spoilerEmojiHelper=new CustomEmojiHelper();
|
||||
spoilerEmojiHelper.setText(parsedSpoilerText);
|
||||
}
|
||||
session = AccountSessionManager.getInstance().getAccount(parentFragment.getAccountID());
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -71,9 +78,10 @@ public class TextStatusDisplayItem extends StatusDisplayItem{
|
||||
public static class Holder extends StatusDisplayItem.Holder<TextStatusDisplayItem> implements ImageLoaderViewHolder{
|
||||
private final LinkedTextView text;
|
||||
private final LinearLayout spoilerHeader;
|
||||
private final TextView spoilerTitle, spoilerTitleInline;
|
||||
private final View spoilerOverlay, borderTop, borderBottom;
|
||||
private final TextView spoilerTitle, spoilerTitleInline, translateInfo;
|
||||
private final View spoilerOverlay, borderTop, borderBottom, textWrap, translateWrap, translateProgress;
|
||||
private final Drawable backgroundColor, borderColor;
|
||||
private final Button translateButton;
|
||||
|
||||
public Holder(Activity activity, ViewGroup parent){
|
||||
super(activity, R.layout.display_item_text, parent);
|
||||
@@ -84,6 +92,11 @@ public class TextStatusDisplayItem extends StatusDisplayItem{
|
||||
spoilerOverlay=findViewById(R.id.spoiler_overlay);
|
||||
borderTop=findViewById(R.id.border_top);
|
||||
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));
|
||||
|
||||
TypedValue outValue=new TypedValue();
|
||||
@@ -97,26 +110,9 @@ public class TextStatusDisplayItem extends StatusDisplayItem{
|
||||
|
||||
@Override
|
||||
public void onBind(TextStatusDisplayItem item){
|
||||
if(item.status.wantsTranslation){
|
||||
new GetStatusTranslation(item.status.id)
|
||||
.setCallback(new Callback<StatusTranslation>(){
|
||||
@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.setText(item.translated
|
||||
? HtmlParser.parse(item.translation.content, item.status.emojis, item.status.mentions, item.status.tags, item.parentFragment.getAccountID())
|
||||
: item.text);
|
||||
text.setTextIsSelectable(item.textSelectable);
|
||||
spoilerTitleInline.setTextIsSelectable(item.textSelectable);
|
||||
text.setInvalidateOnEveryFrame(false);
|
||||
@@ -130,20 +126,60 @@ public class TextStatusDisplayItem extends StatusDisplayItem{
|
||||
if(item.status.spoilerRevealed){
|
||||
spoilerOverlay.setVisibility(View.GONE);
|
||||
spoilerHeader.setVisibility(View.VISIBLE);
|
||||
text.setVisibility(View.VISIBLE);
|
||||
textWrap.setVisibility(View.VISIBLE);
|
||||
itemView.setClickable(false);
|
||||
}else{
|
||||
spoilerOverlay.setVisibility(View.VISIBLE);
|
||||
spoilerHeader.setVisibility(View.GONE);
|
||||
text.setVisibility(View.GONE);
|
||||
textWrap.setVisibility(View.GONE);
|
||||
itemView.setClickable(true);
|
||||
}
|
||||
}else{
|
||||
spoilerOverlay.setVisibility(View.GONE);
|
||||
spoilerHeader.setVisibility(View.GONE);
|
||||
text.setVisibility(View.VISIBLE);
|
||||
textWrap.setVisibility(View.VISIBLE);
|
||||
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
|
||||
|
||||
@@ -182,7 +182,7 @@ public class HtmlParser{
|
||||
ssb.append("…", new DeleteWhenCopiedSpan(), Spanned.SPAN_EXCLUSIVE_EXCLUSIVE);
|
||||
}else if(blockElements.contains(el.nodeName()) && node.nextSibling()!=null){
|
||||
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
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,9 +1,16 @@
|
||||
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.app.Activity;
|
||||
import android.app.ProgressDialog;
|
||||
import android.content.ActivityNotFoundException;
|
||||
import android.content.ClipData;
|
||||
import android.content.ClipboardManager;
|
||||
import android.content.Context;
|
||||
import android.content.DialogInterface;
|
||||
import android.content.Intent;
|
||||
import android.content.res.ColorStateList;
|
||||
import android.content.res.Configuration;
|
||||
@@ -11,6 +18,7 @@ import android.content.res.TypedArray;
|
||||
import android.database.Cursor;
|
||||
import android.graphics.Bitmap;
|
||||
import android.graphics.Canvas;
|
||||
import android.graphics.Typeface;
|
||||
import android.graphics.drawable.BitmapDrawable;
|
||||
import android.graphics.drawable.Drawable;
|
||||
import android.graphics.drawable.InsetDrawable;
|
||||
@@ -19,10 +27,12 @@ import android.os.Build;
|
||||
import android.os.Bundle;
|
||||
import android.os.Handler;
|
||||
import android.os.Looper;
|
||||
import android.os.VibrationEffect;
|
||||
import android.os.Vibrator;
|
||||
import android.provider.OpenableColumns;
|
||||
import android.provider.Settings;
|
||||
import android.text.SpannableStringBuilder;
|
||||
import android.text.Spanned;
|
||||
import android.text.TextUtils;
|
||||
import android.view.Menu;
|
||||
import android.view.MenuItem;
|
||||
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.AuthorizeFollowRequest;
|
||||
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.GetStatusByID;
|
||||
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.StatusDeletedEvent;
|
||||
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.ListTimelineFragment;
|
||||
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.ListTimeline;
|
||||
import org.joinmastodon.android.model.Relationship;
|
||||
import org.joinmastodon.android.model.SearchResults;
|
||||
import org.joinmastodon.android.model.Status;
|
||||
import org.joinmastodon.android.ui.M3AlertDialogBuilder;
|
||||
import org.joinmastodon.android.ui.text.CustomEmojiSpan;
|
||||
@@ -70,6 +80,8 @@ import org.parceler.Parcels;
|
||||
|
||||
import java.io.File;
|
||||
import java.lang.reflect.Method;
|
||||
import java.net.URI;
|
||||
import java.net.URISyntaxException;
|
||||
import java.time.Instant;
|
||||
import java.time.ZoneId;
|
||||
import java.time.ZonedDateTime;
|
||||
@@ -656,93 +668,76 @@ public class UiUtils{
|
||||
}
|
||||
|
||||
public static void setUserPreferredTheme(Context context){
|
||||
// boolean isDarkTheme = isDarkTheme();
|
||||
switch(GlobalUserPreferences.color){
|
||||
case PINK:
|
||||
context.setTheme(switch(GlobalUserPreferences.theme){
|
||||
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;
|
||||
}
|
||||
context.setTheme(switch (theme) {
|
||||
case LIGHT -> R.style.Theme_Mastodon_Light;
|
||||
case DARK -> trueBlackTheme ? R.style.Theme_Mastodon_Dark_TrueBlack : R.style.Theme_Mastodon_Dark;
|
||||
default -> trueBlackTheme ? R.style.Theme_Mastodon_AutoLightDark_TrueBlack : R.style.Theme_Mastodon_AutoLightDark;
|
||||
});
|
||||
|
||||
ColorPalette palette = ColorPalette.palettes.get(GlobalUserPreferences.color);
|
||||
if (palette != null) palette.apply(context);
|
||||
}
|
||||
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 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);
|
||||
if(accountID!=null && "https".equals(uri.getScheme()) && AccountSessionManager.getInstance().getAccount(accountID).domain.equalsIgnoreCase(uri.getAuthority())){
|
||||
List<String> path=uri.getPathSegments();
|
||||
// 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]+$")){
|
||||
List<String> path=uri.getPathSegments();
|
||||
if(accountID!=null && "https".equals(uri.getScheme())){
|
||||
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())){
|
||||
new GetStatusByID(path.get(1))
|
||||
.setCallback(new Callback<>(){
|
||||
@Override
|
||||
@@ -759,11 +754,61 @@ public class UiUtils{
|
||||
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);
|
||||
return;
|
||||
}
|
||||
}
|
||||
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"));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item android:color="?colorSecondary"/>
|
||||
<item android:color="?colorGray50"/>
|
||||
</selector>
|
||||
6
mastodon/src/main/res/color/translate_icon.xml
Normal file
6
mastodon/src/main/res/color/translate_icon.xml
Normal 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>
|
||||
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<solid android:color="?colorWindowBackground"/>
|
||||
<solid android:color="?colorGray800"/>
|
||||
<corners android:radius="10dp"/>
|
||||
<padding android:top="16dp" android:left="16dp" android:right="16dp" android:bottom="16dp"/>
|
||||
</shape>
|
||||
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<solid android:color="@color/gray_25"/>
|
||||
<solid android:color="?colorGray25"/>
|
||||
<corners android:radius="10dp"/>
|
||||
<padding android:top="16dp" android:left="16dp" android:right="16dp" android:bottom="16dp"/>
|
||||
</shape>
|
||||
@@ -2,7 +2,7 @@
|
||||
<ripple xmlns:android="http://schemas.android.com/apk/res/android" android:color="@color/highlight_over_dark">
|
||||
<item>
|
||||
<shape android:shape="oval">
|
||||
<solid android:color="?colorSearchHint"/>
|
||||
<solid android:color="?colorGray600"/>
|
||||
</shape>
|
||||
</item>
|
||||
</ripple>
|
||||
@@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item>
|
||||
<shape android:tint="@color/gray_800">
|
||||
<shape android:tint="?colorGray800">
|
||||
<solid android:color="#CC000000"/>
|
||||
</shape>
|
||||
</item>
|
||||
|
||||
@@ -1,6 +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_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:drawable="@drawable/ic_fluent_arrow_repeat_all_off_24_regular"/>
|
||||
</selector>
|
||||
@@ -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>
|
||||
@@ -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>
|
||||
@@ -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">
|
||||
<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>
|
||||
|
||||
@@ -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>
|
||||
@@ -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>
|
||||
@@ -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>
|
||||
@@ -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>
|
||||
@@ -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>
|
||||
@@ -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>
|
||||
@@ -5,5 +5,5 @@
|
||||
android:viewportHeight="4">
|
||||
<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:fillColor="@color/gray_500"/>
|
||||
android:fillColor="?colorGray500"/>
|
||||
</vector>
|
||||
|
||||
6
mastodon/src/main/res/drawable/ic_translate.xml
Normal file
6
mastodon/src/main/res/drawable/ic_translate.xml
Normal 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>
|
||||
@@ -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>
|
||||
@@ -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>
|
||||
@@ -1,5 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<corners android:radius="27dp"/>
|
||||
<stroke android:width="2dp" android:color="@color/gray_25"/>
|
||||
<stroke android:width="2dp" android:color="?colorGray25"/>
|
||||
</shape>
|
||||
@@ -2,14 +2,14 @@
|
||||
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item android:gravity="center_vertical">
|
||||
<shape>
|
||||
<solid android:color="@color/gray_500"/>
|
||||
<solid android:color="?colorGray500"/>
|
||||
<corners android:radius="1dp"/>
|
||||
<size android:height="2dp"/>
|
||||
</shape>
|
||||
</item>
|
||||
<item android:gravity="center_vertical" android:id="@android:id/secondaryProgress">
|
||||
<clip>
|
||||
<shape android:tint="@color/gray_50">
|
||||
<shape android:tint="?colorGray50">
|
||||
<solid android:color="#40000000"/>
|
||||
<corners android:radius="1dp"/>
|
||||
<size android:height="2dp"/>
|
||||
@@ -19,7 +19,7 @@
|
||||
<item android:gravity="center_vertical" android:id="@android:id/progress">
|
||||
<clip>
|
||||
<shape>
|
||||
<solid android:color="@color/gray_50"/>
|
||||
<solid android:color="?colorGray50"/>
|
||||
<corners android:radius="1dp"/>
|
||||
<size android:height="2dp"/>
|
||||
</shape>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<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"/>
|
||||
</shape>
|
||||
@@ -6,7 +6,7 @@
|
||||
android:shape="ring"
|
||||
android:thickness="4dp"
|
||||
android:useLevel="true">
|
||||
<solid android:color="@color/gray_100"/>
|
||||
<solid android:color="?colorGray100"/>
|
||||
</shape>
|
||||
</item>
|
||||
</layer-list>
|
||||
@@ -83,7 +83,7 @@
|
||||
android:layout_alignParentTop="true"
|
||||
android:src="@drawable/ic_fluent_dismiss_24_filled"
|
||||
android:contentDescription="@string/cancel"
|
||||
android:tint="@color/gray_100"
|
||||
android:tint="?colorGray100"
|
||||
android:background="@drawable/bg_upload_progress"/>
|
||||
|
||||
<ProgressBar
|
||||
@@ -104,7 +104,7 @@
|
||||
android:layout_height="16dp"
|
||||
android:layout_below="@id/retry_or_cancel_upload"
|
||||
android:layout_marginTop="16dp"
|
||||
android:textColor="@color/gray_200"
|
||||
android:textColor="?colorGray200"
|
||||
android:textSize="14dp"
|
||||
android:gravity="center_horizontal"
|
||||
android:singleLine="true"
|
||||
@@ -119,7 +119,7 @@
|
||||
android:layout_height="32dp"
|
||||
android:layout_below="@id/state_title"
|
||||
android:includeFontPadding="false"
|
||||
android:textColor="@color/gray_200"
|
||||
android:textColor="?colorGray200"
|
||||
android:gravity="center_horizontal|top"
|
||||
android:lines="2"
|
||||
android:maxLines="2"
|
||||
|
||||
@@ -26,20 +26,8 @@
|
||||
android:layout_width="36dp"
|
||||
android:layout_height="36dp"
|
||||
android:layout_marginTop="-6dp"
|
||||
android:layout_marginEnd="6dp"
|
||||
android:layout_toStartOf="@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:layout_marginRight="6dp"
|
||||
android:layout_toLeftOf="@id/more"
|
||||
android:background="?android:selectableItemBackgroundBorderless"
|
||||
android:scaleType="center"
|
||||
android:src="@drawable/ic_visibility"
|
||||
@@ -58,7 +46,7 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="24dp"
|
||||
android:layout_marginEnd="8dp"
|
||||
android:layout_toStartOf="@id/translate"
|
||||
android:layout_toStartOf="@id/visibility"
|
||||
android:layout_toEndOf="@id/avatar">
|
||||
|
||||
<TextView
|
||||
@@ -90,7 +78,7 @@
|
||||
android:layout_height="20dp"
|
||||
android:layout_below="@id/name_wrap"
|
||||
android:layout_marginEnd="8dp"
|
||||
android:layout_toStartOf="@id/translate"
|
||||
android:layout_toStartOf="@id/visibility"
|
||||
android:layout_toEndOf="@id/avatar"
|
||||
android:layoutDirection="locale"
|
||||
android:orientation="horizontal">
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
android:paddingBottom="12dp">
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/text_wrap"
|
||||
android:orientation="vertical"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
@@ -32,10 +33,9 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:textAppearance="@style/m3_title_medium"
|
||||
android:background="@color/error_900"
|
||||
android:background="?colorBackgroundLight"
|
||||
tools:text="CW title"/>
|
||||
|
||||
|
||||
<View
|
||||
android:id="@+id/border_bottom"
|
||||
android:layout_width="match_parent"
|
||||
@@ -49,27 +49,58 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingHorizontal="16dp"
|
||||
android:textSize="16sp"
|
||||
android:textAppearance="@style/m3_body_large"
|
||||
tools:text="setting up my mstdn"/>
|
||||
android:textAppearance="@style/m3_body_large"/>
|
||||
|
||||
<!-- <Button-->
|
||||
<!-- android:id="@+id/translate"-->
|
||||
<!-- 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/pink_color" />-->
|
||||
<org.joinmastodon.android.ui.views.AutoOrientationLinearLayout
|
||||
android:id="@+id/translate_wrap"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="8dp"
|
||||
android:gravity="center_vertical">
|
||||
|
||||
<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
|
||||
android:visibility="gone"
|
||||
android:id="@+id/spoiler_overlay"
|
||||
|
||||
@@ -42,7 +42,7 @@
|
||||
android:layout_margin="16dp"
|
||||
android:paddingRight="8dp"
|
||||
android:paddingLeft="8dp"
|
||||
android:textColor="@color/gray_50t"
|
||||
android:textColor="?colorGray50t"
|
||||
android:textAllCaps="true"
|
||||
android:fontFamily="sans-serif-medium"
|
||||
android:textSize="14dp"
|
||||
@@ -85,7 +85,7 @@
|
||||
<LinearLayout
|
||||
android:id="@+id/posts_btn"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="56dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="12dp"
|
||||
android:layout_marginEnd="12dp"
|
||||
android:gravity="center_horizontal"
|
||||
@@ -112,7 +112,7 @@
|
||||
<LinearLayout
|
||||
android:id="@+id/following_btn"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="56dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="12dp"
|
||||
android:layout_marginEnd="16dp"
|
||||
android:padding="4dp"
|
||||
@@ -140,7 +140,7 @@
|
||||
<LinearLayout
|
||||
android:id="@+id/followers_btn"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="56dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="12dp"
|
||||
android:layout_marginEnd="12dp"
|
||||
android:padding="4dp"
|
||||
|
||||
46
mastodon/src/main/res/layout/item_settings_button.xml
Normal file
46
mastodon/src/main/res/layout/item_settings_button.xml
Normal 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>
|
||||
@@ -15,7 +15,7 @@
|
||||
android:layout_marginEnd="32dp"
|
||||
android:importantForAccessibility="no"
|
||||
android:tint="?android:textColorPrimary"
|
||||
tools:src="@drawable/ic_color_theme_preference"/>
|
||||
tools:src="@drawable/ic_fluent_color_24_regular"/>
|
||||
|
||||
|
||||
<TextView
|
||||
@@ -27,7 +27,7 @@
|
||||
android:textSize="16sp"
|
||||
android:singleLine="true"
|
||||
android:ellipsize="end"
|
||||
android:text="@string/sk_settings_color_picker"/>
|
||||
android:text="@string/sk_settings_color_palette"/>
|
||||
|
||||
<Button
|
||||
android:id="@+id/color_picker_button"
|
||||
|
||||
@@ -35,7 +35,7 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_vertical|end"
|
||||
android:background="?android:selectableItemBackground"
|
||||
android:textColor="?colorAccentLight"
|
||||
android:textColor="?android:textColorPrimary"
|
||||
android:textAllCaps="true"
|
||||
android:textSize="14dp"
|
||||
android:paddingLeft="16dp"
|
||||
|
||||
@@ -12,7 +12,6 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:paddingHorizontal="16dp"
|
||||
android:drawableLeft="@drawable/ic_fluent_people_community_24_regular"
|
||||
android:drawableTint="?android:textColorSecondary"
|
||||
android:drawablePadding="16dp"
|
||||
android:textAppearance="@style/m3_title_medium"
|
||||
@@ -26,6 +25,7 @@
|
||||
android:clickable="false"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:visibility="gone"
|
||||
android:paddingRight="16dp"/>
|
||||
|
||||
<!-- <ImageView-->
|
||||
@@ -55,7 +55,7 @@
|
||||
android:layout_marginRight="8dp"
|
||||
android:layout_marginBottom="8dp"
|
||||
android:src="@drawable/ic_pause_24"
|
||||
android:tint="@color/gray_50"
|
||||
android:tint="?colorGray50"
|
||||
android:contentDescription="@string/pause"
|
||||
android:background="?android:selectableItemBackgroundBorderless"/>
|
||||
|
||||
|
||||
@@ -1,10 +1,12 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<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/purple_color" android:title="@string/sk_color_theme_purple"/>
|
||||
<item android:id="@+id/pink_color" android:title="@string/sk_color_theme_pink"/>
|
||||
<item android:id="@+id/green_color" android:title="@string/sk_color_theme_green"/>
|
||||
<item android:id="@+id/blue_color" android:title="@string/sk_color_theme_blue"/>
|
||||
<item android:id="@+id/orange_color" android:title="@string/sk_color_theme_brown"/>
|
||||
<item android:id="@+id/yellow_color" android:title="@string/sk_color_theme_yellow"/>
|
||||
<item android:id="@+id/m3_color" android:title="@string/sk_color_palette_material3"/>
|
||||
<item android:id="@+id/purple_color" android:title="@string/sk_color_palette_purple"/>
|
||||
<item android:id="@+id/pink_color" android:title="@string/sk_color_palette_pink"/>
|
||||
<item android:id="@+id/green_color" android:title="@string/sk_color_palette_green"/>
|
||||
<item android:id="@+id/blue_color" android:title="@string/sk_color_palette_blue"/>
|
||||
<item android:id="@+id/brown_color" android:title="@string/sk_color_palette_brown"/>
|
||||
<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>
|
||||
@@ -1,6 +1,7 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<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/favorites" android:title="@string/your_favorites" android:icon="@drawable/ic_fluent_star_24_regular"/>
|
||||
<item android:id="@+id/share" android:title="@string/share_user" android:icon="@drawable/ic_fluent_share_24_regular"/>
|
||||
<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" android:showAsAction="always"/>
|
||||
<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>
|
||||
@@ -40,11 +40,11 @@
|
||||
<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_notify_posts">Notificacions de publicacions</string>
|
||||
<string name="sk_settings_color_picker">Color de tema</string>
|
||||
<string name="sk_color_theme_pink">Rosa</string>
|
||||
<string name="sk_color_theme_purple">Lila</string>
|
||||
<string name="sk_color_theme_green">Verd</string>
|
||||
<string name="sk_color_theme_blue">Blau</string>
|
||||
<string name="sk_color_theme_brown">Marró</string>
|
||||
<string name="sk_color_theme_yellow">Groc</string>
|
||||
<string name="sk_settings_color_palette">Color de tema</string>
|
||||
<string name="sk_color_palette_pink">Rosa</string>
|
||||
<string name="sk_color_palette_purple">Lila</string>
|
||||
<string name="sk_color_palette_green">Verd</string>
|
||||
<string name="sk_color_palette_blue">Blau</string>
|
||||
<string name="sk_color_palette_brown">Marró</string>
|
||||
<string name="sk_color_palette_yellow">Groc</string>
|
||||
</resources>
|
||||
@@ -40,13 +40,13 @@
|
||||
<string name="sk_settings_show_federated_timeline">Föderierte Timeline anzeigen</string>
|
||||
<string name="sk_notify_posts">Beitrags-Benachrichtigungen</string>
|
||||
<string name="sk_settings_color_picker">Farbschema</string>
|
||||
<string name="sk_color_theme_pink">Pink</string>
|
||||
<string name="sk_color_theme_purple">Violett</string>
|
||||
<string name="sk_color_theme_green">Grün</string>
|
||||
<string name="sk_color_theme_brown">Braun</string>
|
||||
<string name="sk_color_theme_yellow">Gelb</string>
|
||||
<string name="sk_color_palette_pink">Pink</string>
|
||||
<string name="sk_color_palette_purple">Violett</string>
|
||||
<string name="sk_color_palette_green">Grün</string>
|
||||
<string name="sk_color_palette_brown">Braun</string>
|
||||
<string name="sk_color_palette_yellow">Gelb</string>
|
||||
<string name="sk_notification_type_status">Beiträge</string>
|
||||
<string name="sk_color_theme_blue">Blau</string>
|
||||
<string name="sk_color_palette_blue">Blau</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>
|
||||
@@ -56,4 +56,17 @@
|
||||
<string name="sk_translate_show_original">Original anzeigen</string>
|
||||
<string name="sk_available_languages">Verfügbare Sprachen</string>
|
||||
<string name="sk_clear_recent_languages">Zuletzt verwendete Sprachen leeren</string>
|
||||
<string name="sk_welcome_title">Willkommen!</string>
|
||||
<string name="sk_example_domain">beispiel.social</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_color_theme_material3">System</string>
|
||||
<string name="sk_color_theme_red">Rot</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_tabs_disable_swipe">Wischen zwischen Tabs deaktivieren</string>
|
||||
</resources>
|
||||
@@ -56,4 +56,9 @@
|
||||
<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_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>
|
||||
@@ -56,4 +56,9 @@
|
||||
<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_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>
|
||||
@@ -28,7 +28,7 @@
|
||||
<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_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_pin_post">Sematkan ke profil</string>
|
||||
<string name="sk_visibility_unlisted">Tidak terdaftar</string>
|
||||
@@ -41,10 +41,24 @@
|
||||
<string name="sk_notification_type_status">Kiriman</string>
|
||||
<string name="sk_notify_posts">Notifikasi kiriman</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_green">Hijau</string>
|
||||
<string name="sk_color_theme_blue">Biru</string>
|
||||
<string name="sk_color_theme_brown">Cokelat</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>
|
||||
@@ -2,13 +2,13 @@
|
||||
<resources>
|
||||
<string name="sk_notification_type_status">Post</string>
|
||||
<string name="sk_notify_posts">Notifiche post</string>
|
||||
<string name="sk_settings_color_picker">Colore del tema</string>
|
||||
<string name="sk_color_theme_pink">Rosa</string>
|
||||
<string name="sk_color_theme_purple">Viola</string>
|
||||
<string name="sk_color_theme_green">Verde</string>
|
||||
<string name="sk_color_theme_blue">Blu</string>
|
||||
<string name="sk_color_theme_brown">Marrone</string>
|
||||
<string name="sk_color_theme_yellow">Giallo</string>
|
||||
<string name="sk_settings_color_palette">Colore del tema</string>
|
||||
<string name="sk_color_palette_pink">Rosa</string>
|
||||
<string name="sk_color_palette_purple">Viola</string>
|
||||
<string name="sk_color_palette_green">Verde</string>
|
||||
<string name="sk_color_palette_blue">Blu</string>
|
||||
<string name="sk_color_palette_brown">Marrone</string>
|
||||
<string name="sk_color_palette_yellow">Giallo</string>
|
||||
<string name="sk_app_name">Moshidon</string>
|
||||
<string name="sk_pinned_posts">Fissati</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_disable_marquee">Disabilita scorrimento titoli</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>
|
||||
@@ -56,4 +56,9 @@
|
||||
<string name="sk_available_languages">모든 언어</string>
|
||||
<string name="sk_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>
|
||||
@@ -1,5 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<color name="shortcut_icon_background">@color/gray_700</color>
|
||||
<color name="shortcut_icon_foreground">@color/original_primary_600</color>
|
||||
<color name="shortcut_icon_background">#282C37</color>
|
||||
<!-- <color name="shortcut_icon_foreground">@color/purple_primary_600</color>-->
|
||||
</resources>
|
||||
4
mastodon/src/main/res/values-night/palettes.xml
Normal file
4
mastodon/src/main/res/values-night/palettes.xml
Normal file
@@ -0,0 +1,4 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<style name="ColorPalette.Material3.AutoLightDark" parent="ColorPalette.Material3.Dark"/>
|
||||
</resources>
|
||||
@@ -2,22 +2,4 @@
|
||||
<resources>
|
||||
<style name="Theme.Mastodon.AutoLightDark" parent="Theme.Mastodon.Dark"/>
|
||||
<style name="Theme.Mastodon.AutoLightDark.TrueBlack" parent="Theme.Mastodon.Dark.TrueBlack"/>
|
||||
|
||||
<style name="Theme.Mastodon.AutoLightDark.Original" parent="Theme.Mastodon.Dark.Original"/>
|
||||
<style name="Theme.Mastodon.AutoLightDark.TrueBlack.Original" parent="Theme.Mastodon.Dark.TrueBlack.Original"/>
|
||||
|
||||
<style name="Theme.Mastodon.AutoLightDark.Green" parent="Theme.Mastodon.Dark.Green"/>
|
||||
<style name="Theme.Mastodon.AutoLightDark.TrueBlack.Green" parent="Theme.Mastodon.Dark.TrueBlack.Green"/>
|
||||
|
||||
<style name="Theme.Mastodon.AutoLightDark.Blue" parent="Theme.Mastodon.Dark.Blue"/>
|
||||
<style name="Theme.Mastodon.AutoLightDark.TrueBlack.Blue" parent="Theme.Mastodon.Dark.TrueBlack.Blue"/>
|
||||
|
||||
<style name="Theme.Mastodon.AutoLightDark.Orange" parent="Theme.Mastodon.Dark.Orange"/>
|
||||
<style name="Theme.Mastodon.AutoLightDark.TrueBlack.Orange" parent="Theme.Mastodon.Dark.TrueBlack.Orange"/>
|
||||
|
||||
<style name="Theme.Mastodon.AutoLightDark.Yellow" parent="Theme.Mastodon.Dark.Yellow"/>
|
||||
<style name="Theme.Mastodon.AutoLightDark.TrueBlack.Yellow" parent="Theme.Mastodon.Dark.TrueBlack.Yellow"/>
|
||||
|
||||
<style name="Theme.Mastodon.AutoLightDark.Material3" parent="Theme.Mastodon.Dark.Material3"/>
|
||||
<style name="Theme.Mastodon.AutoLightDark.TrueBlack.Material3" parent="Theme.Mastodon.Dark.TrueBlack.Material3"/>
|
||||
</resources>
|
||||
3
mastodon/src/main/res/values-notnight/palettes.xml
Normal file
3
mastodon/src/main/res/values-notnight/palettes.xml
Normal file
@@ -0,0 +1,3 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
</resources>
|
||||
@@ -15,7 +15,7 @@
|
||||
<string name="sk_mark_media_as_sensitive">Oznacz jako wrażliwe</string>
|
||||
<string name="sk_user_post_notifications_on">Włączono powiadomienia dla postu %s</string>
|
||||
<string name="sk_user_post_notifications_off">Wyłączono powiadomienia dla postu %s</string>
|
||||
<string name="sk_federated_timeline">Globalne</string>
|
||||
<string name="sk_federated_timeline">fediwersum</string>
|
||||
<string name="sk_federated_timeline_info_banner">To są najnowsze post ze znanej sieci fediwersum dla twojego serwera.</string>
|
||||
<string name="sk_update_available">Moshidon %s jest dostępny do pobrania.</string>
|
||||
<string name="sk_update_ready">Moshidon %s został pobrany i jest gotowy do instalacji.</string>
|
||||
@@ -40,13 +40,13 @@
|
||||
<string name="sk_visibility_unlisted">Niewidoczny</string>
|
||||
<string name="sk_notification_type_status">Wpisy</string>
|
||||
<string name="sk_notify_posts">Powiadomienia wpisów</string>
|
||||
<string name="sk_settings_color_picker">Motyw</string>
|
||||
<string name="sk_color_theme_pink">Różowy</string>
|
||||
<string name="sk_color_theme_purple">Fioletowy</string>
|
||||
<string name="sk_color_theme_green">Zielony</string>
|
||||
<string name="sk_color_theme_blue">Niebieski</string>
|
||||
<string name="sk_color_theme_brown">Brązowy</string>
|
||||
<string name="sk_color_theme_yellow">Żółty</string>
|
||||
<string name="sk_settings_color_palette">Motyw</string>
|
||||
<string name="sk_color_palette_pink">Różowy</string>
|
||||
<string name="sk_color_palette_purple">Fioletowy</string>
|
||||
<string name="sk_color_palette_green">Zielony</string>
|
||||
<string name="sk_color_palette_blue">Niebieski</string>
|
||||
<string name="sk_color_palette_brown">Brązowy</string>
|
||||
<string name="sk_color_palette_yellow">Żółty</string>
|
||||
<string name="sk_poll_allow_multiple">Pozwalaj na wybieranie wielu opcji</string>
|
||||
<string name="sk_translate_post">Przetłumacz</string>
|
||||
<string name="sk_translate_show_original">Pokaż oryginał</string>
|
||||
@@ -56,4 +56,7 @@
|
||||
<string name="sk_language_name">%s (%s)</string>
|
||||
<string name="sk_confirm_clear_recent_languages">Czy na pewno chcesz wyczyścić ostatnio użyte języki\?</string>
|
||||
<string name="sk_clear_recent_languages">Wyczyść ostatnio użyte języki</string>
|
||||
<string name="sk_example_domain">przykład.social</string>
|
||||
<string name="sk_welcome_title">Witaj!</string>
|
||||
<string name="sk_welcome_text">Rekin się kłania! Aby zacząć, wpisz adres swojej instancji poniżej.</string>
|
||||
</resources>
|
||||
@@ -54,4 +54,11 @@
|
||||
<string name="sk_language_name">%s (%s)</string>
|
||||
<string name="sk_confirm_clear_recent_languages">Tem certeza de que deseja limpar os idiomas usados recentemente\?</string>
|
||||
<string name="sk_clear_recent_languages">Limpar idiomas usados recentemente</string>
|
||||
<string name="sk_notify_posts">Notificações de posts</string>
|
||||
<string name="sk_poll_allow_multiple">Permitir múltiplas escolhas</string>
|
||||
<string name="sk_welcome_text">O tubarão te cumprimenta! Para começar, por favor, digite abaixo o nome de domínio de sua instância de origem.</string>
|
||||
<string name="sk_example_domain">exemplo.social</string>
|
||||
<string name="sk_welcome_title">Bem vindo!</string>
|
||||
<string name="sk_color_theme_material3">Sistema</string>
|
||||
<string name="sk_color_theme_red">Vermelho</string>
|
||||
</resources>
|
||||
@@ -15,4 +15,50 @@
|
||||
<string name="sk_visibility_unlisted">Скрытый</string>
|
||||
<string name="sk_mark_media_as_sensitive">Отметить медиафайл как деликатный</string>
|
||||
<string name="sk_settings_app_version">Moshidon v%1$s (%2$d)</string>
|
||||
<string name="sk_notification_type_status">Публикации</string>
|
||||
<string name="sk_notify_posts">Отправляет публикацию</string>
|
||||
<string name="sk_settings_color_picker">Цветовая схема</string>
|
||||
<string name="sk_color_theme_pink">Розовый</string>
|
||||
<string name="sk_color_theme_purple">Фиолетовый</string>
|
||||
<string name="sk_color_theme_brown">Коричневый</string>
|
||||
<string name="sk_color_theme_yellow">Жёлтый</string>
|
||||
<string name="sk_translate_show_original">Показать оригинальную публикацию</string>
|
||||
<string name="sk_translated_using">Переведено через %s</string>
|
||||
<string name="sk_available_languages">Доступные языки</string>
|
||||
<string name="sk_language_name">%s (%s)</string>
|
||||
<string name="sk_welcome_title">Добро пожаловать!</string>
|
||||
<string name="sk_example_domain">example.social</string>
|
||||
<string name="sk_settings_load_new_posts">Автоматически загружать новые публикации</string>
|
||||
<string name="sk_settings_show_replies">Показывать ответы на публикации</string>
|
||||
<string name="sk_federated_timeline">Федерация</string>
|
||||
<string name="sk_update_available">Moshidon %s готов к скачиванию.</string>
|
||||
<string name="sk_update_ready">Moshidon %s скачан и готов к установке новой версии.</string>
|
||||
<string name="sk_check_for_update">Проверить обновления</string>
|
||||
<string name="sk_follow_requests">Запросы на подписку</string>
|
||||
<string name="sk_lists_with_user">Списки с %s</string>
|
||||
<string name="sk_confirm_unpin_post">Вы точно хотите открепить эту публикацию от профиля\?</string>
|
||||
<string name="sk_unpinning">Открепление публикации…</string>
|
||||
<string name="sk_federated_timeline_info_banner">Это самые последние публикации людей из вашей федерации.</string>
|
||||
<string name="sk_no_update_available">Обновление отсутствует</string>
|
||||
<string name="sk_list_timelines">Списки</string>
|
||||
<string name="sk_accept_follow_request">Принять запрос на подписку</string>
|
||||
<string name="sk_reject_follow_request">Отклонить заявку на подписку</string>
|
||||
<string name="sk_settings_always_reveal_content_warnings">Всегда раскрывать предупреждения о непристойном контенте</string>
|
||||
<string name="sk_settings_contribute">Внести свой код в Moshidon</string>
|
||||
<string name="sk_settings_show_federated_timeline">Показывать федеративную временную шкалу</string>
|
||||
<string name="sk_color_theme_green">Зелёный</string>
|
||||
<string name="sk_color_theme_blue">Синий</string>
|
||||
<string name="sk_translate_post">Перевести</string>
|
||||
<string name="sk_post_language">Язык: %s</string>
|
||||
<string name="sk_clear_recent_languages">Очистить недавно использованные языки</string>
|
||||
<string name="sk_confirm_clear_recent_languages">Вы точно хотите очистить недавно использованные языки\?</string>
|
||||
<string name="sk_welcome_text">Акула приветствует вас! Чтобы начать, пожалуйста, введите домен своего домашнего сервера (инстанса) ниже.</string>
|
||||
<string name="sk_poll_allow_multiple">Разрешить несколько вариантов ответа</string>
|
||||
<string name="sk_user_post_notifications_on">Уведомления о постах %s включены</string>
|
||||
<string name="sk_user_post_notifications_off">Уведомления о новых постах %s отключены</string>
|
||||
<string name="sk_color_theme_material3">Система</string>
|
||||
<string name="sk_settings_show_boosts">Показать репосты</string>
|
||||
<string name="sk_settings_show_interaction_counts">Показывать количество взаимодействий</string>
|
||||
<string name="sk_disable_marquee">Отключить прокручиваемый текст в заголовках</string>
|
||||
<string name="sk_color_theme_red">Красный</string>
|
||||
</resources>
|
||||
@@ -1,12 +1,12 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<string name="sk_notify_posts">Сповіщення про пости</string>
|
||||
<string name="sk_settings_color_picker">Колірна тема</string>
|
||||
<string name="sk_color_theme_purple">Фіолетовий</string>
|
||||
<string name="sk_color_theme_green">Зелений</string>
|
||||
<string name="sk_color_theme_blue">Синий</string>
|
||||
<string name="sk_color_theme_brown">Коричневий</string>
|
||||
<string name="sk_color_theme_yellow">Жовтий</string>
|
||||
<string name="sk_settings_color_palette">Колірна тема</string>
|
||||
<string name="sk_color_palette_purple">Фіолетовий</string>
|
||||
<string name="sk_color_palette_green">Зелений</string>
|
||||
<string name="sk_color_palette_blue">Синий</string>
|
||||
<string name="sk_color_palette_brown">Коричневий</string>
|
||||
<string name="sk_color_palette_yellow">Жовтий</string>
|
||||
<string name="sk_poll_allow_multiple">Дозволити кілька виборів</string>
|
||||
<string name="sk_translate_post">Перекласти</string>
|
||||
<string name="sk_translate_show_original">Показати оригінал</string>
|
||||
@@ -17,7 +17,7 @@
|
||||
<string name="sk_clear_recent_languages">Очистити нещодавно використані мови</string>
|
||||
<string name="sk_settings_always_reveal_content_warnings">Завжди відкривати вміст</string>
|
||||
<string name="sk_notification_type_status">Пости</string>
|
||||
<string name="sk_color_theme_pink">Рожевий</string>
|
||||
<string name="sk_color_palette_pink">Рожевий</string>
|
||||
<string name="sk_confirm_clear_recent_languages">Ви впевнені, що хочете очистити нещодавно використані мови\?</string>
|
||||
<string name="sk_app_name">Moshidon</string>
|
||||
<string name="sk_pinned_posts">Закріплене</string>
|
||||
@@ -56,4 +56,7 @@
|
||||
<string name="sk_no_update_available">Немає доступних оновлень</string>
|
||||
<string name="sk_list_timelines">Списки</string>
|
||||
<string name="sk_settings_show_federated_timeline">Показувати федеративну стрічку</string>
|
||||
<string name="sk_example_domain">example.social</string>
|
||||
<string name="sk_welcome_title">Вітаємо!</string>
|
||||
<string name="sk_welcome_text">Акулка вас вітає! Щоб розпочати, введіть нижче доменне ім’я вашого інстансу.</string>
|
||||
</resources>
|
||||
8
mastodon/src/main/res/values-v24/styles.xml
Normal file
8
mastodon/src/main/res/values-v24/styles.xml
Normal file
@@ -0,0 +1,8 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<style name="Widget.Mastodon.Toolbar" parent="android:Widget.Material.Toolbar">
|
||||
<item name="android:contentInsetStartWithNavigation">0dp</item>
|
||||
<item name="android:titleMarginEnd">0dp</item>
|
||||
<item name="android:titleMarginStart">0dp</item>
|
||||
</style>
|
||||
</resources>
|
||||
@@ -1,8 +1,4 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<color name="navigation_bar_bg">@color/gray_50</color>
|
||||
<color name="green_navigation_bar_bg">@color/green_gray_50</color>
|
||||
<color name="blue_navigation_bar_bg">@color/blue_gray_50</color>
|
||||
<color name="orange_navigation_bar_bg">@color/orange_gray_50</color>
|
||||
<color name="yellow_navigation_bar_bg">@color/yellow_gray_50</color>
|
||||
</resources>
|
||||
@@ -38,13 +38,13 @@
|
||||
<string name="sk_settings_show_federated_timeline">显示联邦时间轴</string>
|
||||
<string name="sk_follow_requests">关注请求</string>
|
||||
<string name="sk_settings_always_reveal_content_warnings">总是显示内容警告</string>
|
||||
<string name="sk_settings_color_picker">主题色</string>
|
||||
<string name="sk_color_theme_pink">粉</string>
|
||||
<string name="sk_color_theme_purple">紫</string>
|
||||
<string name="sk_color_theme_green">绿</string>
|
||||
<string name="sk_color_theme_blue">蓝</string>
|
||||
<string name="sk_color_theme_brown">棕</string>
|
||||
<string name="sk_color_theme_yellow">黄</string>
|
||||
<string name="sk_settings_color_palette">主题色</string>
|
||||
<string name="sk_color_palette_pink">粉</string>
|
||||
<string name="sk_color_palette_purple">紫</string>
|
||||
<string name="sk_color_palette_green">绿</string>
|
||||
<string name="sk_color_palette_blue">蓝</string>
|
||||
<string name="sk_color_palette_brown">棕</string>
|
||||
<string name="sk_color_palette_yellow">黄</string>
|
||||
<string name="sk_notification_type_status">嘟文</string>
|
||||
<string name="sk_notify_posts">嘟文通知</string>
|
||||
</resources>
|
||||
@@ -17,7 +17,28 @@
|
||||
<attr name="colorTabInactive" format="color"/>
|
||||
<attr name="colorAccentLightest" format="color"/>
|
||||
<attr name="profileHeaderBackground" format="color"/>
|
||||
|
||||
<attr name="toolbarBackground" format="color"/>
|
||||
|
||||
<attr name="colorButtonBackgroundPrimaryDarkOnLight" format="color"/>
|
||||
<attr name="colorButtonBackgroundPrimaryDarkOnLightDisabled" format="color"/>
|
||||
<attr name="colorButtonTextPrimaryDarkOnLight" format="color"/>
|
||||
<attr name="colorButtonTextPrimaryDarkOnLightDisabled" format="color"/>
|
||||
|
||||
<attr name="colorButtonBackgroundPrimaryLightOnDark" format="color"/>
|
||||
<attr name="colorButtonBackgroundPrimaryLightOnDarkDisabled" format="color"/>
|
||||
<attr name="colorButtonTextPrimaryLightOnDark" format="color"/>
|
||||
<attr name="colorButtonTextPrimaryLightOnDarkDisabled" format="color"/>
|
||||
|
||||
<attr name="colorButtonBackgroundSecondaryDarkOnLight" format="color"/>
|
||||
<attr name="colorButtonBackgroundSecondaryDarkOnLightDisabled" format="color"/>
|
||||
<attr name="colorButtonTextSecondaryDarkOnLight" format="color"/>
|
||||
<attr name="colorButtonTextSecondaryDarkOnLightDisabled" format="color"/>
|
||||
|
||||
<attr name="colorButtonBackgroundSecondaryLightOnDark" format="color"/>
|
||||
<attr name="colorButtonBackgroundSecondaryLightOnDarkDisabled" format="color"/>
|
||||
<attr name="colorButtonTextSecondaryLightOnDark" format="color"/>
|
||||
<attr name="colorButtonTextSecondaryLightOnDarkDisabled" format="color"/>
|
||||
|
||||
<attr name="colorM3Primary" format="color"/>
|
||||
<attr name="colorM3OnPrimary" format="color"/>
|
||||
<attr name="colorM3PrimaryContainer" format="color"/>
|
||||
@@ -56,4 +77,30 @@
|
||||
<attr name="android:labelTextSize" format="dimension"/>
|
||||
<attr name="labelTextColor" format="color"/>
|
||||
</declare-styleable>
|
||||
|
||||
<attr name="colorPrimary25" format="color" />
|
||||
<attr name="colorPrimary50" format="color" />
|
||||
<attr name="colorPrimary100" format="color" />
|
||||
<attr name="colorPrimary200" format="color" />
|
||||
<attr name="colorPrimary300" format="color" />
|
||||
<attr name="colorPrimary400" format="color" />
|
||||
<attr name="colorPrimary500" format="color" />
|
||||
<attr name="colorPrimary600" format="color" />
|
||||
<attr name="colorPrimary700" format="color" />
|
||||
<attr name="colorPrimary800" format="color" />
|
||||
<attr name="colorPrimary900" format="color" />
|
||||
|
||||
<attr name="colorGray25" format="color" />
|
||||
<attr name="colorGray50" format="color" />
|
||||
<attr name="colorGray50t" format="color" />
|
||||
<attr name="colorGray100" format="color" />
|
||||
<attr name="colorGray200" format="color" />
|
||||
<attr name="colorGray300" format="color" />
|
||||
<attr name="colorGray400" format="color" />
|
||||
<attr name="colorGray500" format="color" />
|
||||
<attr name="colorGray600" format="color" />
|
||||
<attr name="colorGray700" format="color" />
|
||||
<attr name="colorGray800" format="color" />
|
||||
<attr name="colorGray800t" format="color" />
|
||||
<attr name="colorGray900" format="color" />
|
||||
</resources>
|
||||
@@ -5,12 +5,13 @@
|
||||
|
||||
<color name="fluent_default_icon_tint">?android:textColorPrimary</color>
|
||||
|
||||
<color name="gray_900">#121029</color>
|
||||
<color name="gray_800t">#cc2b2938</color>
|
||||
<color name="gray_800">#2b2938</color>
|
||||
<color name="gray_700">#353454</color>
|
||||
<color name="gray_600">#464666</color>
|
||||
<color name="gray_500">#696685</color>
|
||||
<color name="gray_900">#110c10</color>
|
||||
<color name="gray_800t">#cc191417</color>
|
||||
<color name="gray_800">#191417</color>
|
||||
<color name="gray_700">#231f22</color>
|
||||
<color name="gray_600">#3b373a</color>
|
||||
<color name="gray_500">#625d60</color>
|
||||
|
||||
<color name="gray_400">#9998b3</color>
|
||||
<color name="gray_300">#d1d1de</color>
|
||||
<color name="gray_200">#e6e6ed</color>
|
||||
@@ -31,121 +32,6 @@
|
||||
<color name="primary_800">#ae218a</color>
|
||||
<color name="primary_900">#6d1556</color>
|
||||
|
||||
<color name="original_primary_25">#fafaff</color>
|
||||
<color name="original_primary_50">#f4f3ff</color>
|
||||
<color name="original_primary_100">#ebebff</color>
|
||||
<color name="original_primary_200">#d7d7ff</color>
|
||||
<color name="original_primary_300">#c2c2ff</color>
|
||||
<color name="original_primary_400">#9999ff</color>
|
||||
<color name="original_primary_500">#6364ff</color>
|
||||
<color name="original_primary_600">#562cfc</color>
|
||||
<color name="original_primary_700">#431cbb</color>
|
||||
<color name="original_primary_800">#2f0c7a</color>
|
||||
<color name="original_primary_900">#17063b</color>
|
||||
|
||||
<color name="green_primary_25">#fafaff</color>
|
||||
<color name="green_primary_50">#d1feaf</color>
|
||||
<color name="green_primary_100">#bbf294</color>
|
||||
<color name="green_primary_200">#a0d57b</color>
|
||||
<color name="green_primary_300">#85b962</color>
|
||||
<color name="green_primary_400">#6c9e4b</color>
|
||||
<color name="green_primary_500">#528232</color>
|
||||
<color name="green_primary_600">#3b6a1c</color>
|
||||
<color name="green_primary_700">#245103</color>
|
||||
<color name="green_primary_800">#163800</color>
|
||||
<color name="green_primary_900">#0a2100</color>
|
||||
|
||||
<color name="blue_primary_25">#fafaff</color>
|
||||
<color name="blue_primary_50">#e8f2ff</color>
|
||||
<color name="blue_primary_100">#cee5ff</color>
|
||||
<color name="blue_primary_200">#97cbff</color>
|
||||
<color name="blue_primary_300">#65b1f4</color>
|
||||
<color name="blue_primary_400">#4796d7</color>
|
||||
<color name="blue_primary_500">#227bba</color>
|
||||
<color name="blue_primary_600">#00639b</color>
|
||||
<color name="blue_primary_700">#004a76</color>
|
||||
<color name="blue_primary_800">#003354</color>
|
||||
<color name="blue_primary_900">#001d33</color>
|
||||
|
||||
<color name="orange_primary_25">#fafaff</color>
|
||||
<color name="orange_primary_50">#ffeedf</color>
|
||||
<color name="orange_primary_100">#ffdcbb</color>
|
||||
<color name="orange_primary_200">#ffb869</color>
|
||||
<color name="orange_primary_300">#e89a3b</color>
|
||||
<color name="orange_primary_400">#c98121</color>
|
||||
<color name="orange_primary_500">#a96700</color>
|
||||
<color name="orange_primary_600">#885200</color>
|
||||
<color name="orange_primary_700">#673d00</color>
|
||||
<color name="orange_primary_800">#482900</color>
|
||||
<color name="orange_primary_900">#2b1700</color>
|
||||
|
||||
<color name="yellow_primary_25">#fafaff</color>
|
||||
<color name="yellow_primary_50">#fff0ca</color>
|
||||
<color name="yellow_primary_100">#ffe084</color>
|
||||
<color name="yellow_primary_200">#e8c349</color>
|
||||
<color name="yellow_primary_300">#cba82f</color>
|
||||
<color name="yellow_primary_400">#ae8d10</color>
|
||||
<color name="yellow_primary_500">#8f7300</color>
|
||||
<color name="yellow_primary_600">#735c00</color>
|
||||
<color name="yellow_primary_700">#574500</color>
|
||||
<color name="yellow_primary_800">#3c2f00</color>
|
||||
<color name="yellow_primary_900">#231b00</color>
|
||||
|
||||
<color name="custom_gray_900">#000000</color>
|
||||
<color name="custom_gray_800t">#cc171717</color>
|
||||
<color name="custom_gray_800">#171717</color>
|
||||
<color name="custom_gray_700">#191919</color>
|
||||
<color name="custom_gray_600">#212121</color>
|
||||
<color name="custom_gray_500">#242424</color>
|
||||
|
||||
<!-- Old Colors:-->
|
||||
<!-- <color name="green_gray_400">#8f918e</color>-->
|
||||
<!-- <color name="green_gray_300">#a9aca8</color>-->
|
||||
<!-- <color name="green_gray_200">#c5c7c3</color>-->
|
||||
<!-- <color name="green_gray_100">#e1e3df</color>-->
|
||||
<!-- <color name="green_gray_50t">#eff1ed</color>-->
|
||||
<!-- <color name="green_gray_50">#eff1ed</color>-->
|
||||
<!-- <color name="green_gray_25">#f7f8fa</color>-->
|
||||
|
||||
<!-- <color name="blue_gray_400">#919191</color>-->
|
||||
<!-- <color name="blue_gray_300">#ababab</color>-->
|
||||
<!-- <color name="blue_gray_200">#c6c6c6</color>-->
|
||||
<!-- <color name="blue_gray_100">#e2e2e2</color>-->
|
||||
<!-- <color name="blue_gray_50t">#f1f1f1</color>-->
|
||||
<!-- <color name="blue_gray_50">#f1f1f1</color>-->
|
||||
<!-- <color name="blue_gray_25">#f7f8fa</color>-->
|
||||
|
||||
<color name="green_gray_400">#a2b095</color>
|
||||
<color name="green_gray_300">#bdcbaf</color>
|
||||
<color name="green_gray_200">#d9e7ca</color>
|
||||
<color name="green_gray_100">#d9e7ca</color>
|
||||
<color name="green_gray_50t">#cce8f8d8</color>
|
||||
<color name="green_gray_50">#e8f5d8</color>
|
||||
<color name="green_gray_25">#f7f8fa</color>
|
||||
|
||||
<color name="blue_gray_400">#9eadbe</color>
|
||||
<color name="blue_gray_300">#b9c8da</color>
|
||||
<color name="blue_gray_200">#d5e4f7</color>
|
||||
<color name="blue_gray_100">#e8f2ff</color>
|
||||
<color name="blue_gray_50t">#cce8f2ff</color>
|
||||
<color name="blue_gray_50">#e8f2ff</color>
|
||||
<color name="blue_gray_25">#f7f8fa</color>
|
||||
|
||||
<color name="orange_gray_400">#c3a689</color>
|
||||
<color name="orange_gray_300">#e0c1a3</color>
|
||||
<color name="orange_gray_200">#feddbd</color>
|
||||
<color name="orange_gray_100">#ffeedf</color>
|
||||
<color name="orange_gray_50t">#ccffeedf</color>
|
||||
<color name="orange_gray_50">#ffeedf</color>
|
||||
<color name="orange_gray_25">#f7f8fa</color>
|
||||
|
||||
<color name="yellow_gray_400">#b8aa87</color>
|
||||
<color name="yellow_gray_300">#d4c5a1</color>
|
||||
<color name="yellow_gray_200">#f1e1bb</color>
|
||||
<color name="yellow_gray_100">#fff0ca</color>
|
||||
<color name="yellow_gray_50t">#ccfff0ca</color>
|
||||
<color name="yellow_gray_50">#fff0ca</color>
|
||||
<color name="yellow_gray_25">#f7f8fa</color>
|
||||
|
||||
<color name="error_25">#FFFBFA</color>
|
||||
<color name="error_50">#FEF3F2</color>
|
||||
@@ -210,12 +96,39 @@
|
||||
|
||||
<color name="favorite_selected">@color/warning_500</color>
|
||||
<color name="bookmark_selected">@color/success_500</color>
|
||||
<color name="boost_selected">?android:colorPrimary</color>
|
||||
<color name="boost_selected">@color/primary_500</color>
|
||||
|
||||
<color name="shortcut_icon_background">#282C37</color>
|
||||
<!-- <color name="shortcut_icon_foreground">@color/primary_700</color>-->
|
||||
<color name="shortcut_icon_foreground">@color/purple_primary_700</color>
|
||||
|
||||
<!-- M3 dynamic colors -->
|
||||
<color name="m3_navigation_bar_bg">@color/gray_50</color>
|
||||
|
||||
<color name="m3_gray_900">@color/gray_900</color>
|
||||
<color name="m3_gray_800t">@color/gray_800t</color>
|
||||
<color name="m3_gray_800">@color/gray_800</color>
|
||||
<color name="m3_gray_700">@color/gray_700</color>
|
||||
<color name="m3_gray_600">@color/gray_600</color>
|
||||
<color name="m3_gray_500">@color/gray_500</color>
|
||||
<color name="m3_gray_400">@color/gray_400</color>
|
||||
<color name="m3_gray_300">@color/gray_300</color>
|
||||
<color name="m3_gray_200">@color/gray_200</color>
|
||||
<color name="m3_gray_100">@color/gray_100</color>
|
||||
<color name="m3_gray_50t">@color/gray_50t</color>
|
||||
<color name="m3_gray_50">@color/gray_50</color>
|
||||
<color name="m3_gray_25">@color/gray_25</color>
|
||||
|
||||
<color name="m3_primary_25">@color/purple_primary_25</color>
|
||||
<color name="m3_primary_50">@color/purple_primary_50</color>
|
||||
<color name="m3_primary_100">@color/purple_primary_100</color>
|
||||
<color name="m3_primary_200">@color/purple_primary_200</color>
|
||||
<color name="m3_primary_300">@color/purple_primary_300</color>
|
||||
<color name="m3_primary_400">@color/purple_primary_400</color>
|
||||
<color name="m3_primary_500">@color/purple_primary_500</color>
|
||||
<color name="m3_primary_600">@color/purple_primary_600</color>
|
||||
<color name="m3_primary_700">@color/purple_primary_700</color>
|
||||
<color name="m3_primary_800">@color/purple_primary_800</color>
|
||||
<color name="m3_primary_900">@color/purple_primary_900</color>
|
||||
|
||||
<!-- light theme -->
|
||||
<color name="m3_sys_light_primary">#6750A4</color>
|
||||
@@ -259,4 +172,151 @@
|
||||
<color name="m3_sys_dark_on_surface_variant">#CAC4D0</color>
|
||||
<color name="m3_sys_dark_outline">#938F99</color>
|
||||
|
||||
<!-- PALETTE COLORS -->
|
||||
|
||||
<color name="purple_primary_25">#fafaff</color>
|
||||
<color name="purple_primary_50">#f4f3ff</color>
|
||||
<color name="purple_primary_100">#ebebff</color>
|
||||
<color name="purple_primary_200">#d7d7ff</color>
|
||||
<color name="purple_primary_300">#c2c2ff</color>
|
||||
<color name="purple_primary_400">#9999ff</color>
|
||||
<color name="purple_primary_500">#6364ff</color>
|
||||
<color name="purple_primary_600">#562cfc</color>
|
||||
<color name="purple_primary_700">#431cbb</color>
|
||||
<color name="purple_primary_800">#2f0c7a</color>
|
||||
<color name="purple_primary_900">#17063b</color>
|
||||
|
||||
<color name="green_primary_25">#fafaff</color>
|
||||
<color name="green_primary_50">#d1feaf</color>
|
||||
<color name="green_primary_100">#bbf294</color>
|
||||
<color name="green_primary_200">#a0d57b</color>
|
||||
<color name="green_primary_300">#85b962</color>
|
||||
<color name="green_primary_400">#6c9e4b</color>
|
||||
<color name="green_primary_500">#528232</color>
|
||||
<color name="green_primary_600">#3b6a1c</color>
|
||||
<color name="green_primary_700">#245103</color>
|
||||
<color name="green_primary_800">#163800</color>
|
||||
<color name="green_primary_900">#0a2100</color>
|
||||
|
||||
<color name="brownish_gray_900">#110c10</color>
|
||||
<color name="brownish_gray_800">#191417</color>
|
||||
<color name="brownish_gray_800t">#cc191417</color>
|
||||
<color name="brownish_gray_700">#231f22</color>
|
||||
<color name="brownish_gray_600">#3b373a</color>
|
||||
<color name="brownish_gray_500">#625d60</color>
|
||||
|
||||
<color name="green_gray_400">#a2b095</color>
|
||||
<color name="green_gray_300">#bdcbaf</color>
|
||||
<color name="green_gray_200">#d9e7ca</color>
|
||||
<color name="green_gray_100">#d9e7ca</color>
|
||||
<color name="green_gray_50t">#cce8f8d8</color>
|
||||
<color name="green_gray_50">#e8f5d8</color>
|
||||
<color name="green_gray_25">#f7f8fa</color>
|
||||
|
||||
<color name="blue_primary_25">#fafaff</color>
|
||||
<color name="blue_primary_50">#e8f2ff</color>
|
||||
<color name="blue_primary_100">#cee5ff</color>
|
||||
<color name="blue_primary_200">#97cbff</color>
|
||||
<color name="blue_primary_300">#65b1f4</color>
|
||||
<color name="blue_primary_400">#4796d7</color>
|
||||
<color name="blue_primary_500">#227bba</color>
|
||||
<color name="blue_primary_600">#00639b</color>
|
||||
<color name="blue_primary_700">#004a76</color>
|
||||
<color name="blue_primary_800">#003354</color>
|
||||
<color name="blue_primary_900">#001d33</color>
|
||||
|
||||
<color name="blue_gray_400">#9eadbe</color>
|
||||
<color name="blue_gray_300">#b9c8da</color>
|
||||
<color name="blue_gray_200">#d5e4f7</color>
|
||||
<color name="blue_gray_100">#e8f2ff</color>
|
||||
<color name="blue_gray_50t">#cce8f2ff</color>
|
||||
<color name="blue_gray_50">#e8f2ff</color>
|
||||
<color name="blue_gray_25">#f7f8fa</color>
|
||||
|
||||
<color name="brown_primary_25">#fafaff</color>
|
||||
<color name="brown_primary_50">#ffeedf</color>
|
||||
<color name="brown_primary_100">#ffdcbb</color>
|
||||
<color name="brown_primary_200">#ffb869</color>
|
||||
<color name="brown_primary_300">#e89a3b</color>
|
||||
<color name="brown_primary_400">#c98121</color>
|
||||
<color name="brown_primary_500">#a96700</color>
|
||||
<color name="brown_primary_600">#885200</color>
|
||||
<color name="brown_primary_700">#673d00</color>
|
||||
<color name="brown_primary_800">#482900</color>
|
||||
<color name="brown_primary_900">#2b1700</color>
|
||||
|
||||
<color name="brown_gray_400">#c3a689</color>
|
||||
<color name="brown_gray_300">#e0c1a3</color>
|
||||
<color name="brown_gray_200">#feddbd</color>
|
||||
<color name="brown_gray_100">#ffeedf</color>
|
||||
<color name="brown_gray_50t">#ccffeedf</color>
|
||||
<color name="brown_gray_50">#ffeedf</color>
|
||||
<color name="brown_gray_25">#f7f8fa</color>
|
||||
|
||||
<color name="yellow_primary_25">#fafaff</color>
|
||||
<color name="yellow_primary_50">#fff0ca</color>
|
||||
<color name="yellow_primary_100">#ffe084</color>
|
||||
<color name="yellow_primary_200">#e8c349</color>
|
||||
<color name="yellow_primary_300">#cba82f</color>
|
||||
<color name="yellow_primary_400">#ae8d10</color>
|
||||
<color name="yellow_primary_500">#8f7300</color>
|
||||
<color name="yellow_primary_600">#735c00</color>
|
||||
<color name="yellow_primary_700">#574500</color>
|
||||
<color name="yellow_primary_800">#3c2f00</color>
|
||||
<color name="yellow_primary_900">#231b00</color>
|
||||
|
||||
<color name="yellow_gray_400">#b8aa87</color>
|
||||
<color name="yellow_gray_300">#d4c5a1</color>
|
||||
<color name="yellow_gray_200">#f1e1bb</color>
|
||||
<color name="yellow_gray_100">#fff0ca</color>
|
||||
<color name="yellow_gray_50t">#ccfff0ca</color>
|
||||
<color name="yellow_gray_50">#fff0ca</color>
|
||||
<color name="yellow_gray_25">#f7f8fa</color>
|
||||
|
||||
<color name="red_primary_25">#FFFBFA</color>
|
||||
<color name="red_primary_50">#FEF3F2</color>
|
||||
<color name="red_primary_100">#FEE4E2</color>
|
||||
<color name="red_primary_200">#FECDCA</color>
|
||||
<color name="red_primary_300">#FDA29B</color>
|
||||
<color name="red_primary_400">#F97066</color>
|
||||
<color name="red_primary_500">#F04438</color>
|
||||
<color name="red_primary_600">#D92D20</color>
|
||||
<color name="red_primary_700">#B42318</color>
|
||||
<color name="red_primary_800">#912018</color>
|
||||
<color name="red_primary_900">#7A271A</color>
|
||||
|
||||
<color name="red_gray_400">#d69f84</color>
|
||||
<color name="red_gray_300">#f4ba9e</color>
|
||||
<color name="red_gray_200">#ffdbcb</color>
|
||||
<color name="red_gray_100">#ffedea</color>
|
||||
<color name="red_gray_50t">#ffede6ca</color>
|
||||
<color name="red_gray_50">#ffede6</color>
|
||||
<color name="red_gray_25">#f7f8fa</color>
|
||||
|
||||
<color name="nord_primary_25">#fafaff</color>
|
||||
<color name="nord_primary_50">#eff0ff</color>
|
||||
<color name="nord_primary_100">#eceff4</color>
|
||||
<color name="nord_primary_200">#e5e9f0</color>
|
||||
<color name="nord_primary_300">#d8dee9</color>
|
||||
<color name="nord_primary_400">#88c0d0</color>
|
||||
<color name="nord_primary_500">#4c566a</color>
|
||||
<color name="nord_primary_600">#4c566a</color>
|
||||
<color name="nord_primary_700">#81a1c1</color>
|
||||
<color name="nord_primary_800">#3b4252</color>
|
||||
<color name="nord_primary_900">#2e3440</color>
|
||||
|
||||
<color name="nord_gray_900">#3B4252</color>
|
||||
<color name="nord_gray_800t">#cc2D343F</color>
|
||||
<color name="nord_gray_800">#2D343F</color>
|
||||
<color name="nord_gray_700">#3A4250</color>
|
||||
<color name="nord_gray_600">#404C5C</color>
|
||||
<color name="nord_gray_500">#8C96B4</color>
|
||||
|
||||
<color name="nord_gray_400">#8C96B4</color>
|
||||
<color name="nord_gray_300">#c5c6d0</color>
|
||||
<color name="nord_gray_200">#D5DCE6</color>
|
||||
<color name="nord_gray_100">#E2E7EE</color>
|
||||
<color name="nord_gray_50t">#EAEDF2</color>
|
||||
<color name="nord_gray_50">#EAEDF2</color>
|
||||
<color name="nord_gray_25">#f7f8fa</color>
|
||||
</resources>
|
||||
265
mastodon/src/main/res/values/palettes.xml
Normal file
265
mastodon/src/main/res/values/palettes.xml
Normal file
@@ -0,0 +1,265 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<style name="ColorPalette">
|
||||
<item name="colorPrimary25">@color/primary_25</item>
|
||||
<item name="colorPrimary50">@color/primary_50</item>
|
||||
<item name="colorPrimary100">@color/primary_100</item>
|
||||
<item name="colorPrimary200">@color/primary_200</item>
|
||||
<item name="colorPrimary300">@color/primary_300</item>
|
||||
<item name="colorPrimary400">@color/primary_400</item>
|
||||
<item name="colorPrimary500">@color/primary_500</item>
|
||||
<item name="colorPrimary600">@color/primary_600</item>
|
||||
<item name="colorPrimary700">@color/primary_700</item>
|
||||
<item name="colorPrimary800">@color/primary_800</item>
|
||||
<item name="colorPrimary900">@color/primary_900</item>
|
||||
|
||||
<item name="colorGray900">@color/gray_900</item>
|
||||
<item name="colorGray800t">@color/gray_800t</item>
|
||||
<item name="colorGray800">@color/gray_800</item>
|
||||
<item name="colorGray700">@color/gray_700</item>
|
||||
<item name="colorGray600">@color/gray_600</item>
|
||||
<item name="colorGray500">@color/gray_500</item>
|
||||
<item name="colorGray400">@color/gray_400</item>
|
||||
<item name="colorGray300">@color/gray_300</item>
|
||||
<item name="colorGray200">@color/gray_200</item>
|
||||
<item name="colorGray100">@color/gray_100</item>
|
||||
<item name="colorGray50t">@color/gray_50t</item>
|
||||
<item name="colorGray50">@color/gray_50</item>
|
||||
<item name="colorGray25">@color/gray_25</item>
|
||||
</style>
|
||||
|
||||
<style name="ColorPalette.Material3">
|
||||
<item name="colorPrimary25">@color/m3_primary_25</item>
|
||||
<item name="colorPrimary50">@color/m3_primary_50</item>
|
||||
<item name="colorPrimary100">@color/m3_primary_100</item>
|
||||
<item name="colorPrimary200">@color/m3_primary_200</item>
|
||||
<item name="colorPrimary300">@color/m3_primary_300</item>
|
||||
<item name="colorPrimary400">@color/m3_primary_400</item>
|
||||
<item name="colorPrimary500">@color/m3_primary_500</item>
|
||||
<item name="colorPrimary600">@color/m3_primary_600</item>
|
||||
<item name="colorPrimary700">@color/m3_primary_700</item>
|
||||
<item name="colorPrimary800">@color/m3_primary_800</item>
|
||||
<item name="colorPrimary900">@color/m3_primary_900</item>
|
||||
|
||||
<item name="colorGray900">@color/m3_gray_900</item>
|
||||
<item name="colorGray800t">@color/m3_gray_800t</item>
|
||||
<item name="colorGray800">@color/m3_gray_800</item>
|
||||
<item name="colorGray700">@color/m3_gray_700</item>
|
||||
<item name="colorGray600">@color/m3_gray_600</item>
|
||||
<item name="colorGray500">@color/m3_gray_500</item>
|
||||
<item name="colorGray400">@color/m3_gray_400</item>
|
||||
<item name="colorGray300">@color/m3_gray_300</item>
|
||||
<item name="colorGray200">@color/m3_gray_200</item>
|
||||
<item name="colorGray100">@color/m3_gray_100</item>
|
||||
<item name="colorGray50t">@color/m3_gray_50t</item>
|
||||
<item name="colorGray50">@color/m3_gray_50</item>
|
||||
<item name="colorGray25">@color/m3_gray_25</item>
|
||||
</style>
|
||||
|
||||
<style name="ColorPalette.Material3.Dark">
|
||||
<item name="colorPollVoted">?colorGray700</item>
|
||||
<item name="colorWindowBackground">?colorGray900</item>
|
||||
<item name="colorBackgroundLight">?colorGray800</item>
|
||||
<item name="colorBackgroundLightest">?colorGray900</item>
|
||||
<item name="android:colorBackground">?colorGray800</item>
|
||||
<item name="android:statusBarColor">?colorGray900</item>
|
||||
<item name="toolbarBackground">?colorGray900</item>
|
||||
</style>
|
||||
|
||||
<style name="ColorPalette.Pink">
|
||||
<item name="colorPrimary25">@color/primary_25</item>
|
||||
<item name="colorPrimary50">@color/primary_50</item>
|
||||
<item name="colorPrimary100">@color/primary_100</item>
|
||||
<item name="colorPrimary200">@color/primary_200</item>
|
||||
<item name="colorPrimary300">@color/primary_300</item>
|
||||
<item name="colorPrimary400">@color/primary_400</item>
|
||||
<item name="colorPrimary500">@color/primary_500</item>
|
||||
<item name="colorPrimary600">@color/primary_600</item>
|
||||
<item name="colorPrimary700">@color/primary_700</item>
|
||||
<item name="colorPrimary800">@color/primary_800</item>
|
||||
<item name="colorPrimary900">@color/primary_900</item>
|
||||
</style>
|
||||
|
||||
<style name="ColorPalette.Purple">
|
||||
<item name="colorPrimary25">@color/purple_primary_25</item>
|
||||
<item name="colorPrimary50">@color/purple_primary_50</item>
|
||||
<item name="colorPrimary100">@color/purple_primary_100</item>
|
||||
<item name="colorPrimary200">@color/purple_primary_200</item>
|
||||
<item name="colorPrimary300">@color/purple_primary_300</item>
|
||||
<item name="colorPrimary400">@color/purple_primary_400</item>
|
||||
<item name="colorPrimary500">@color/purple_primary_500</item>
|
||||
<item name="colorPrimary600">@color/purple_primary_600</item>
|
||||
<item name="colorPrimary700">@color/purple_primary_700</item>
|
||||
<item name="colorPrimary800">@color/purple_primary_800</item>
|
||||
<item name="colorPrimary900">@color/purple_primary_900</item>
|
||||
</style>
|
||||
|
||||
<style name="ColorPalette.Green">
|
||||
<item name="colorPrimary25">@color/green_primary_25</item>
|
||||
<item name="colorPrimary50">@color/green_primary_50</item>
|
||||
<item name="colorPrimary100">@color/green_primary_100</item>
|
||||
<item name="colorPrimary200">@color/green_primary_200</item>
|
||||
<item name="colorPrimary300">@color/green_primary_300</item>
|
||||
<item name="colorPrimary400">@color/green_primary_400</item>
|
||||
<item name="colorPrimary500">@color/green_primary_500</item>
|
||||
<item name="colorPrimary600">@color/green_primary_600</item>
|
||||
<item name="colorPrimary700">@color/green_primary_700</item>
|
||||
<item name="colorPrimary800">@color/green_primary_800</item>
|
||||
<item name="colorPrimary900">@color/green_primary_900</item>
|
||||
|
||||
<item name="colorGray900">@color/brownish_gray_900</item>
|
||||
<item name="colorGray800t">@color/brownish_gray_800t</item>
|
||||
<item name="colorGray800">@color/brownish_gray_800</item>
|
||||
<item name="colorGray700">@color/brownish_gray_700</item>
|
||||
<item name="colorGray600">@color/brownish_gray_600</item>
|
||||
<item name="colorGray500">@color/brownish_gray_500</item>
|
||||
|
||||
<item name="colorGray400">@color/green_gray_400</item>
|
||||
<item name="colorGray300">@color/green_gray_300</item>
|
||||
<item name="colorGray200">@color/green_gray_200</item>
|
||||
<item name="colorGray100">@color/green_gray_100</item>
|
||||
<item name="colorGray50t">@color/green_gray_50t</item>
|
||||
<item name="colorGray50">@color/green_gray_50</item>
|
||||
<item name="colorGray25">@color/green_gray_25</item>
|
||||
</style>
|
||||
|
||||
<style name="ColorPalette.Blue">
|
||||
<item name="colorPrimary25">@color/blue_primary_25</item>
|
||||
<item name="colorPrimary50">@color/blue_primary_50</item>
|
||||
<item name="colorPrimary100">@color/blue_primary_100</item>
|
||||
<item name="colorPrimary200">@color/blue_primary_200</item>
|
||||
<item name="colorPrimary300">@color/blue_primary_300</item>
|
||||
<item name="colorPrimary400">@color/blue_primary_400</item>
|
||||
<item name="colorPrimary500">@color/blue_primary_500</item>
|
||||
<item name="colorPrimary600">@color/blue_primary_600</item>
|
||||
<item name="colorPrimary700">@color/blue_primary_700</item>
|
||||
<item name="colorPrimary800">@color/blue_primary_800</item>
|
||||
<item name="colorPrimary900">@color/blue_primary_900</item>
|
||||
|
||||
<item name="colorGray400">@color/blue_gray_400</item>
|
||||
<item name="colorGray300">@color/blue_gray_300</item>
|
||||
<item name="colorGray200">@color/blue_gray_200</item>
|
||||
<item name="colorGray100">@color/blue_gray_100</item>
|
||||
<item name="colorGray50t">@color/blue_gray_50t</item>
|
||||
<item name="colorGray50">@color/blue_gray_50</item>
|
||||
<item name="colorGray25">@color/blue_gray_25</item>
|
||||
</style>
|
||||
|
||||
<style name="ColorPalette.Brown">
|
||||
<item name="colorPrimary25">@color/brown_primary_25</item>
|
||||
<item name="colorPrimary50">@color/brown_primary_50</item>
|
||||
<item name="colorPrimary100">@color/brown_primary_100</item>
|
||||
<item name="colorPrimary200">@color/brown_primary_200</item>
|
||||
<item name="colorPrimary300">@color/brown_primary_300</item>
|
||||
<item name="colorPrimary400">@color/brown_primary_400</item>
|
||||
<item name="colorPrimary500">@color/brown_primary_500</item>
|
||||
<item name="colorPrimary600">@color/brown_primary_600</item>
|
||||
<item name="colorPrimary700">@color/brown_primary_700</item>
|
||||
<item name="colorPrimary800">@color/brown_primary_800</item>
|
||||
<item name="colorPrimary900">@color/brown_primary_900</item>
|
||||
|
||||
<item name="colorGray900">@color/brownish_gray_900</item>
|
||||
<item name="colorGray800t">@color/brownish_gray_800t</item>
|
||||
<item name="colorGray800">@color/brownish_gray_800</item>
|
||||
<item name="colorGray700">@color/brownish_gray_700</item>
|
||||
<item name="colorGray600">@color/brownish_gray_600</item>
|
||||
<item name="colorGray500">@color/brownish_gray_500</item>
|
||||
|
||||
<item name="colorGray400">@color/brown_gray_400</item>
|
||||
<item name="colorGray300">@color/brown_gray_300</item>
|
||||
<item name="colorGray200">@color/brown_gray_200</item>
|
||||
<item name="colorGray100">@color/brown_gray_100</item>
|
||||
<item name="colorGray50t">@color/brown_gray_50t</item>
|
||||
<item name="colorGray50">@color/brown_gray_50</item>
|
||||
<item name="colorGray25">@color/brown_gray_25</item>
|
||||
</style>
|
||||
|
||||
<style name="ColorPalette.Yellow">
|
||||
<item name="colorPrimary25">@color/yellow_primary_25</item>
|
||||
<item name="colorPrimary50">@color/yellow_primary_50</item>
|
||||
<item name="colorPrimary100">@color/yellow_primary_100</item>
|
||||
<item name="colorPrimary200">@color/yellow_primary_200</item>
|
||||
<item name="colorPrimary300">@color/yellow_primary_300</item>
|
||||
<item name="colorPrimary400">@color/yellow_primary_400</item>
|
||||
<item name="colorPrimary500">@color/yellow_primary_500</item>
|
||||
<item name="colorPrimary600">@color/yellow_primary_600</item>
|
||||
<item name="colorPrimary700">@color/yellow_primary_700</item>
|
||||
<item name="colorPrimary800">@color/yellow_primary_800</item>
|
||||
<item name="colorPrimary900">@color/yellow_primary_900</item>
|
||||
|
||||
<item name="colorGray900">@color/brownish_gray_900</item>
|
||||
<item name="colorGray800t">@color/brownish_gray_800t</item>
|
||||
<item name="colorGray800">@color/brownish_gray_800</item>
|
||||
<item name="colorGray700">@color/brownish_gray_700</item>
|
||||
<item name="colorGray600">@color/brownish_gray_600</item>
|
||||
<item name="colorGray500">@color/brownish_gray_500</item>
|
||||
|
||||
<item name="colorGray400">@color/yellow_gray_400</item>
|
||||
<item name="colorGray300">@color/yellow_gray_300</item>
|
||||
<item name="colorGray200">@color/yellow_gray_200</item>
|
||||
<item name="colorGray100">@color/yellow_gray_100</item>
|
||||
<item name="colorGray50t">@color/yellow_gray_50t</item>
|
||||
<item name="colorGray50">@color/yellow_gray_50</item>
|
||||
<item name="colorGray25">@color/yellow_gray_25</item>
|
||||
</style>
|
||||
|
||||
|
||||
<style name="ColorPalette.Red">
|
||||
<item name="colorPrimary25">@color/red_primary_25</item>
|
||||
<item name="colorPrimary50">@color/red_primary_50</item>
|
||||
<item name="colorPrimary100">@color/red_primary_100</item>
|
||||
<item name="colorPrimary200">@color/red_primary_200</item>
|
||||
<item name="colorPrimary300">@color/red_primary_300</item>
|
||||
<item name="colorPrimary400">@color/red_primary_400</item>
|
||||
<item name="colorPrimary500">@color/red_primary_500</item>
|
||||
<item name="colorPrimary600">@color/red_primary_600</item>
|
||||
<item name="colorPrimary700">@color/red_primary_700</item>
|
||||
<item name="colorPrimary800">@color/red_primary_800</item>
|
||||
<item name="colorPrimary900">@color/red_primary_900</item>
|
||||
|
||||
<item name="colorGray900">@color/brownish_gray_900</item>
|
||||
<item name="colorGray800t">@color/brownish_gray_800t</item>
|
||||
<item name="colorGray800">@color/brownish_gray_800</item>
|
||||
<item name="colorGray700">@color/brownish_gray_700</item>
|
||||
<item name="colorGray600">@color/brownish_gray_600</item>
|
||||
<item name="colorGray500">@color/brownish_gray_500</item>
|
||||
|
||||
<item name="colorGray400">@color/red_gray_400</item>
|
||||
<item name="colorGray300">@color/red_gray_300</item>
|
||||
<item name="colorGray200">@color/red_gray_200</item>
|
||||
<item name="colorGray100">@color/red_gray_100</item>
|
||||
<item name="colorGray50t">@color/red_gray_50t</item>
|
||||
<item name="colorGray50">@color/red_gray_50</item>
|
||||
<item name="colorGray25">@color/red_gray_25</item>
|
||||
</style>
|
||||
|
||||
<style name="ColorPalette.Nord">
|
||||
<item name="colorPrimary25">@color/nord_primary_25</item>
|
||||
<item name="colorPrimary50">@color/nord_primary_50</item>
|
||||
<item name="colorPrimary100">@color/nord_primary_100</item>
|
||||
<item name="colorPrimary200">@color/nord_primary_200</item>
|
||||
<item name="colorPrimary300">@color/nord_primary_300</item>
|
||||
<item name="colorPrimary400">@color/nord_primary_400</item>
|
||||
<item name="colorPrimary500">@color/nord_primary_500</item>
|
||||
<item name="colorPrimary600">@color/nord_primary_600</item>
|
||||
<item name="colorPrimary700">@color/nord_primary_700</item>
|
||||
<item name="colorPrimary800">@color/nord_primary_800</item>
|
||||
<item name="colorPrimary900">@color/nord_primary_900</item>
|
||||
|
||||
<item name="colorGray900">@color/nord_gray_900</item>
|
||||
<item name="colorGray800t">@color/nord_gray_800t</item>
|
||||
<item name="colorGray800">@color/nord_gray_800</item>
|
||||
<item name="colorGray700">@color/nord_gray_700</item>
|
||||
<item name="colorGray600">@color/nord_gray_600</item>
|
||||
<item name="colorGray500">@color/nord_gray_500</item>
|
||||
|
||||
<item name="colorGray400">@color/nord_gray_400</item>
|
||||
<item name="colorGray300">@color/nord_gray_300</item>
|
||||
<item name="colorGray200">@color/nord_gray_200</item>
|
||||
<item name="colorGray100">@color/nord_gray_100</item>
|
||||
<item name="colorGray50t">@color/nord_gray_50t</item>
|
||||
<item name="colorGray50">@color/nord_gray_50</item>
|
||||
<item name="colorGray25">@color/nord_gray_25</item>
|
||||
</style>
|
||||
|
||||
</resources>
|
||||
@@ -2,7 +2,7 @@
|
||||
<resources>
|
||||
<string name="app_name" translatable="false">Moshidon</string>
|
||||
|
||||
<string name="get_started">Get started</string>
|
||||
<string name="get_started">Create account</string>
|
||||
<string name="already_have_account">I already have an account</string>
|
||||
<string name="log_in">Log in</string>
|
||||
<string name="next">Next</string>
|
||||
@@ -398,17 +398,6 @@
|
||||
<string name="remove_bookmark">Remove bookmark</string>
|
||||
<string name="bookmarks">Bookmarks</string>
|
||||
<string name="your_favorites">Your Favorites</string>
|
||||
<string name="settings_always_reveal_content_warnings">Always reveal content warnings</string>
|
||||
<string name="disable_marquee">Disable scrolling text in title bars</string>
|
||||
<string name="settings_contribute_fork">Contribute to Moshidon</string>
|
||||
<!-- <string name="settings_color_picker">Color theme:</string>-->
|
||||
<!-- <string name="pink_color">Pink</string>-->
|
||||
<!-- <string name="purple_color">Purple</string>-->
|
||||
<!-- <string name="green_color">Green</string>-->
|
||||
<!-- <string name="blue_color">Blue</string>-->
|
||||
<!-- <string name="orange_color">Orange</string>-->
|
||||
<!-- <string name="yellow_color">Yellow</string>-->
|
||||
<string name="translate">Translate</string>
|
||||
<string name="login_title">Welcome Back</string>
|
||||
<string name="login_subtitle">Log in with the server where you created your account.</string>
|
||||
<string name="server_url">Server URL</string>
|
||||
@@ -433,9 +422,5 @@
|
||||
<string name="not_accepting_new_members">Not accepting new members</string>
|
||||
<string name="category_special_interests">Special Interests</string>
|
||||
<string name="signup_passwords_dont_match">Passwords don\'t match</string>
|
||||
<string name="post_language">Language: %s</string>
|
||||
<string name="available_languages">Available languages</string>
|
||||
<string name="language_name">%s (%s)</string>
|
||||
<string name="clear_recent_languages">Clear recent languages</string>
|
||||
<string name="confirm_clear_recent_languages">Are you sure you want to clear your recently used languages?</string>
|
||||
<string name="loading_fediverse_resource_title">Looking it up on the Fediverse…</string>
|
||||
</resources>
|
||||
@@ -1,64 +1,91 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<string name="sk_app_name" translatable="false">Moshidon</string>
|
||||
<string name="sk_pinned_posts">Pinned</string>
|
||||
<string name="sk_delete_and_redraft">Delete and re-draft</string>
|
||||
<string name="sk_confirm_delete_and_redraft_title">Delete and re-draft Post</string>
|
||||
<string name="sk_confirm_delete_and_redraft">Are you sure you want to delete and re-draft this post?</string>
|
||||
<string name="sk_pin_post">Pin to profile</string>
|
||||
<string name="sk_confirm_pin_post_title">Pin post to profile</string>
|
||||
<string name="sk_confirm_pin_post">Do you want to pin this post to your profile?</string>
|
||||
<string name="sk_pinning">Pinning post…</string>
|
||||
<string name="sk_unpin_post">Unpin from profile</string>
|
||||
<string name="sk_confirm_unpin_post_title">Unpin post from profile</string>
|
||||
<string name="sk_confirm_unpin_post">Are you sure you want to unpin this post?</string>
|
||||
<string name="sk_unpinning">Unpinning post…</string>
|
||||
<string name="sk_image_description">Image description</string>
|
||||
<string name="sk_visibility_unlisted">Unlisted</string>
|
||||
<string name="sk_settings_show_replies">Show replies</string>
|
||||
<string name="sk_settings_show_boosts">Show boosts</string>
|
||||
<string name="sk_settings_load_new_posts">Automatically load new posts</string>
|
||||
<string name="sk_settings_show_interaction_counts">Show interaction counts</string>
|
||||
<string name="sk_settings_app_version">Moshidon v%1$s (%2$d)</string>
|
||||
<string name="sk_mark_media_as_sensitive">Mark media as sensitive</string>
|
||||
<string name="sk_user_post_notifications_on">Turned on post notifications for %s</string>
|
||||
<string name="sk_user_post_notifications_off">Turned off post notifications for %s</string>
|
||||
<string name="sk_federated_timeline">Federation</string>
|
||||
<string name="sk_federated_timeline_info_banner">These are the most recent posts by the people in your federation.</string>
|
||||
<string name="sk_update_available">Moshidon %s is ready to download.</string>
|
||||
<string name="sk_update_ready">Moshidon %s is downloaded and ready to install.</string>
|
||||
<string name="sk_check_for_update">Check for update</string>
|
||||
<string name="sk_no_update_available">No update available</string>
|
||||
<string name="sk_list_timelines">Lists</string>
|
||||
<string name="sk_follow_requests">Follow requests</string>
|
||||
<string name="sk_accept_follow_request">Accept follow request</string>
|
||||
<string name="sk_reject_follow_request">Reject follow request</string>
|
||||
<string name="sk_lists_with_user">Lists with %s</string>
|
||||
<string name="sk_settings_always_reveal_content_warnings">Always reveal content warnings</string>
|
||||
<string name="sk_disable_marquee">Disable scrolling text in title bars</string>
|
||||
<string name="sk_settings_contribute">Contribute to Moshidon</string>
|
||||
<string name="sk_settings_show_federated_timeline">Show federated timeline</string>
|
||||
<string name="sk_notification_type_status">Posts</string>
|
||||
<string name="sk_notify_posts">Post notifications</string>
|
||||
<string name="sk_settings_color_picker">Color theme</string>
|
||||
<string name="sk_color_theme_pink">Pink</string>
|
||||
<string name="sk_color_theme_purple">Purple</string>
|
||||
<string name="sk_color_theme_green">Green</string>
|
||||
<string name="sk_color_theme_blue">Blue</string>
|
||||
<string name="sk_color_theme_brown">Orange</string>
|
||||
<string name="sk_color_theme_yellow">Yellow</string>
|
||||
<string name="sk_color_theme_material3">Material You</string>
|
||||
<string name="sk_not_supported">Not supported on your device</string>
|
||||
<string name="sk_poll_allow_multiple">Allow multiple choices</string>
|
||||
<string name="sk_translate_post">Translate</string>
|
||||
<string name="sk_translate_show_original">Show original</string>
|
||||
<string name="sk_translated_using">Translated using %s</string>
|
||||
<string name="sk_post_language">Language: %s</string>
|
||||
<string name="sk_available_languages">Available languages</string>
|
||||
<string name="sk_language_name">%s (%s)</string>
|
||||
<string name="sk_clear_recent_languages">Clear recent languages</string>
|
||||
<string name="sk_confirm_clear_recent_languages">Are you sure you want to clear your recently used languages?</string>
|
||||
<string name="sk_welcome_title">Welcome to Moshidon!</string>
|
||||
<string name="sk_welcome_text">To get started, please enter your home instance’s domain name below.</string>
|
||||
<string name="sk_example_domain">example.social</string>
|
||||
</resources>
|
||||
<string name="sk_app_name">Moshidon</string>
|
||||
<string name="sk_pinned_posts">Pinned</string>
|
||||
<string name="sk_delete_and_redraft">Delete and re-draft</string>
|
||||
<string name="sk_confirm_delete_and_redraft_title">Delete and re-draft Post</string>
|
||||
<string name="sk_confirm_delete_and_redraft">Are you sure you want to delete and re-draft this post?</string>
|
||||
<string name="sk_pin_post">Pin to profile</string>
|
||||
<string name="sk_confirm_pin_post_title">Pin post to profile</string>
|
||||
<string name="sk_confirm_pin_post">Do you want to pin this post to your profile?</string>
|
||||
<string name="sk_pinning">Pinning post…</string>
|
||||
<string name="sk_unpin_post">Unpin from profile</string>
|
||||
<string name="sk_confirm_unpin_post_title">Unpin post from profile</string>
|
||||
<string name="sk_confirm_unpin_post">Are you sure you want to unpin this post?</string>
|
||||
<string name="sk_unpinning">Unpinning post…</string>
|
||||
<string name="sk_image_description">Image description</string>
|
||||
<string name="sk_visibility_unlisted">Unlisted</string>
|
||||
<string name="sk_settings_show_replies">Show replies</string>
|
||||
<string name="sk_settings_show_boosts">Show boosts</string>
|
||||
<string name="sk_settings_load_new_posts">Automatically load new posts</string>
|
||||
<string name="sk_settings_show_interaction_counts">Show interaction counts</string>
|
||||
<string name="sk_settings_app_version">Moshidon v%1$s (%2$d)</string>
|
||||
<string name="sk_mark_media_as_sensitive">Mark media as sensitive</string>
|
||||
<string name="sk_user_post_notifications_on">Turned on post notifications for %s</string>
|
||||
<string name="sk_user_post_notifications_off">Turned off post notifications for %s</string>
|
||||
<string name="sk_federated_timeline">Federation</string>
|
||||
<string name="sk_federated_timeline_info_banner">These are the most recent posts by the people in your federation.</string>
|
||||
<string name="sk_update_available">Moshidon %s is ready to download.</string>
|
||||
<string name="sk_update_ready">Moshidon %s is downloaded and ready to install.</string>
|
||||
<string name="sk_check_for_update">Check for update</string>
|
||||
<string name="sk_no_update_available">No update available</string>
|
||||
<string name="sk_list_timelines">Lists</string>
|
||||
<string name="sk_follow_requests">Follow requests</string>
|
||||
<string name="sk_accept_follow_request">Accept follow request</string>
|
||||
<string name="sk_reject_follow_request">Reject follow request</string>
|
||||
<string name="sk_lists_with_user">Lists with %s</string>
|
||||
<string name="sk_settings_always_reveal_content_warnings">Always reveal content warnings</string>
|
||||
<string name="sk_disable_marquee">Disable scrolling text in title bars</string>
|
||||
<string name="sk_settings_contribute">Contribute to Moshidon</string>
|
||||
<string name="sk_settings_show_federated_timeline">Show federated timeline</string>
|
||||
<string name="sk_notification_type_status">Posts</string>
|
||||
<string name="sk_notify_posts">Post notifications</string>
|
||||
<string name="sk_settings_color_palette">Color palette</string>
|
||||
<string name="sk_color_palette_material3">System</string>
|
||||
<string name="sk_color_palette_pink">Pink</string>
|
||||
<string name="sk_color_palette_purple">Purple</string>
|
||||
<string name="sk_color_palette_green">Green</string>
|
||||
<string name="sk_color_palette_blue">Blue</string>
|
||||
<string name="sk_color_palette_brown">Brown</string>
|
||||
<string name="sk_color_palette_red">Red</string>
|
||||
<string name="sk_color_palette_yellow">Yellow</string>
|
||||
<string name="sk_color_palette_nord">Nord</string>
|
||||
<string name="sk_poll_allow_multiple">Allow multiple choices</string>
|
||||
<string name="sk_translate_post">Translate</string>
|
||||
<string name="sk_translate_show_original">Show original</string>
|
||||
<string name="sk_translated_using">Translated using %s</string>
|
||||
<string name="sk_post_language">Language: %s</string>
|
||||
<string name="sk_available_languages">Available languages</string>
|
||||
<string name="sk_language_name">%s (%s)</string>
|
||||
<string name="sk_clear_recent_languages">Clear recently used languages</string>
|
||||
<string name="sk_confirm_clear_recent_languages">Are you sure you want to clear your recently used languages?</string>
|
||||
<string name="sk_welcome_title">Welcome!</string>
|
||||
<string name="sk_welcome_text">The shark salutes you! To get started, please enter your home instance’s domain name below.</string>
|
||||
<string name="sk_example_domain">example.social</string>
|
||||
<string name="sk_app_username" translatable="false">\@megalodon</string>
|
||||
<string name="sk_tabs_disable_swipe">Disable swiping between tabs</string>
|
||||
<string name="sk_settings_profile">Set up profile</string>
|
||||
<string name="sk_settings_posting">Posting preferences</string>
|
||||
<string name="sk_settings_filters">Configure filters</string>
|
||||
<string name="sk_settings_auth">Security settings</string>
|
||||
<string name="sk_settings_rules">Rules</string>
|
||||
<string name="sk_settings_about">About the app</string>
|
||||
<string name="sk_settings_donate">Donate</string>
|
||||
<string name="sk_delete_notification">Delete notification</string>
|
||||
<string name="sk_delete_notification_confirm_action">Delete notification</string>
|
||||
<string name="sk_delete_notification_confirm">Are you sure you want to delete this notification?</string>
|
||||
<string name="sk_clear_all_notifications">Clear all notifications</string>
|
||||
<string name="sk_clear_all_notifications_confirm_action">Delete all</string>
|
||||
<string name="sk_clear_all_notifications_confirm">Are you sure you want to clear all notifications\?</string>
|
||||
<string name="sk_enable_delete_notifications">Enable deleting notifications</string>
|
||||
<string name="sk_settings_publish_button_text">Publish button text</string>
|
||||
<string name="sk_settings_publish_button_text_title">Customize Publish button text</string>
|
||||
<string name="sk_settings_hide_translate_in_timeline">Hide translate button in timeline</string>
|
||||
<string name="sk_settings_translation_availability_note_available">%s supports translation!</string>
|
||||
<string name="sk_settings_translation_availability_note_unavailable">%s does not appear to support translation.</string>
|
||||
<string name="sk_loading_fediverse_resource_title">Looking it up on the Fediverse…</string>
|
||||
<string name="sk_undo_reblog">Undo reblog</string>
|
||||
<string name="sk_reblog_with_visibility">Reblog with visibility</string>
|
||||
<string name="sk_quote_post">Post about this</string>
|
||||
<string name="sk_hashtags_you_follow">Hashtags you follow</string>
|
||||
</resources>
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user