Compare commits

..

1 Commits

Author SHA1 Message Date
LucasGGamerM
708331fca1 Adding the ability to long click or to double click the search icon to bring up the keyboard
(cherry picked from commit ee0737c9c7)
2023-01-04 21:55:19 -03:00
20 changed files with 48 additions and 182 deletions

View File

@@ -1,32 +0,0 @@
---
name: Bug report
about: Create a report to help us improve
title: ''
labels: bug
assignees: ''
---
**Describe the bug**
A clear and concise description of what the bug is.
**To Reproduce**
Steps to reproduce the behavior:
1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
4. See error
**Screenshots and screen recordings**
If applicable, add screenshots (and screen recordings, if possible) to help explain your problem.
**Version**
Megalodon version: [e.g. v1.1.4+fork.#]
**Additional context**
- Does this issue also occur with the respective upstream release? (Please test using the respective `upstream-xxxxxx.apk` provided in [Releases](https://github.com/sk22/megalodon/releases)) No / Yes (`mastodon#…`)
> In this case, please consider filing an [upstream bug report](https://github.com/mastodon/mastodon-android/issues) instead. If this bug is seriously impacting your usage or you think I might want to try to fix it for Megalodon, feel free to still create this issue!
**Crash log**
If you know your way around Android development tools, please consider attaching a crash log, if possible.

View File

@@ -1,20 +0,0 @@
---
name: Feature/UI request
about: Suggest an idea for this project
title: ''
labels: feature
assignees: ''
---
**Is your feature request related to a problem? Please describe.**
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
**Describe the solution you'd like**
A clear and concise description of what you want to happen.
**Describe alternatives you've considered**
If applicable: a clear and concise description of any alternative solutions or features you've considered.
**Additional context**
Add any other context or screenshots about the feature request here.

View File

@@ -1,10 +0,0 @@
---
name: It's something else…
about: Issues that can't be categorized as feature requests or bug reports
title: ''
labels: ''
assignees: ''
---

View File

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

View File

@@ -32,7 +32,6 @@ public class GlobalUserPreferences{
public static boolean enableDeleteNotifications; public static boolean enableDeleteNotifications;
public static boolean relocatePublishButton; public static boolean relocatePublishButton;
public static boolean reduceMotion; public static boolean reduceMotion;
public static boolean keepOnlyLatestNotification;
public static String publishButtonText; public static String publishButtonText;
public static ThemePreference theme; public static ThemePreference theme;
public static ColorPreference color; public static ColorPreference color;
@@ -70,8 +69,6 @@ public class GlobalUserPreferences{
relocatePublishButton=prefs.getBoolean("relocatePublishButton", true); relocatePublishButton=prefs.getBoolean("relocatePublishButton", true);
voteButtonForSingleChoice=prefs.getBoolean("voteButtonForSingleChoice", true); voteButtonForSingleChoice=prefs.getBoolean("voteButtonForSingleChoice", true);
enableDeleteNotifications=prefs.getBoolean("enableDeleteNotifications", true); enableDeleteNotifications=prefs.getBoolean("enableDeleteNotifications", true);
reduceMotion=prefs.getBoolean("reduceMotion", false);
keepOnlyLatestNotification=prefs.getBoolean("keepOnlyLatestNotification", false);
theme=ThemePreference.values()[prefs.getInt("theme", 0)]; theme=ThemePreference.values()[prefs.getInt("theme", 0)];
recentLanguages=fromJson(prefs.getString("recentLanguages", "{}"), recentLanguagesType, new HashMap<>()); recentLanguages=fromJson(prefs.getString("recentLanguages", "{}"), recentLanguagesType, new HashMap<>());
recentEmojis=fromJson(prefs.getString("recentEmojis", "{}"), recentEmojisType, new HashMap<>()); recentEmojis=fromJson(prefs.getString("recentEmojis", "{}"), recentEmojisType, new HashMap<>());
@@ -107,7 +104,6 @@ public class GlobalUserPreferences{
.putBoolean("uniformNotificationIcon", uniformNotificationIcon) .putBoolean("uniformNotificationIcon", uniformNotificationIcon)
.putBoolean("enableDeleteNotifications", enableDeleteNotifications) .putBoolean("enableDeleteNotifications", enableDeleteNotifications)
.putBoolean("reduceMotion", reduceMotion) .putBoolean("reduceMotion", reduceMotion)
.putBoolean("keepOnlyLatestNotification", keepOnlyLatestNotification)
.putString("publishButtonText", publishButtonText) .putString("publishButtonText", publishButtonText)
.putInt("theme", theme.ordinal()) .putInt("theme", theme.ordinal())
.putString("color", color.name()) .putString("color", color.name())

View File

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

View File

@@ -1,11 +1,16 @@
package org.joinmastodon.android.fragments; package org.joinmastodon.android.fragments;
import static android.content.Context.CLIPBOARD_SERVICE;
import android.animation.Animator; import android.animation.Animator;
import android.animation.AnimatorListenerAdapter; import android.animation.AnimatorListenerAdapter;
import android.animation.AnimatorSet; import android.animation.AnimatorSet;
import android.animation.ObjectAnimator; import android.animation.ObjectAnimator;
import android.app.Activity; import android.app.Activity;
import android.app.Fragment; import android.app.Fragment;
import android.content.ClipData;
import android.content.ClipboardManager;
import android.content.Context;
import android.content.Intent; import android.content.Intent;
import android.content.res.Configuration; import android.content.res.Configuration;
import android.graphics.Outline; import android.graphics.Outline;
@@ -14,6 +19,8 @@ import android.graphics.drawable.Drawable;
import android.net.Uri; import android.net.Uri;
import android.os.Build; import android.os.Build;
import android.os.Bundle; import android.os.Bundle;
import android.os.VibrationEffect;
import android.os.Vibrator;
import android.text.SpannableStringBuilder; import android.text.SpannableStringBuilder;
import android.text.TextUtils; import android.text.TextUtils;
import android.text.style.ImageSpan; import android.text.style.ImageSpan;
@@ -31,16 +38,13 @@ import android.widget.Button;
import android.widget.EditText; import android.widget.EditText;
import android.widget.FrameLayout; import android.widget.FrameLayout;
import android.widget.ImageView; import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.ProgressBar; import android.widget.ProgressBar;
import android.widget.RelativeLayout; import android.widget.RelativeLayout;
import android.widget.TextView; import android.widget.TextView;
import android.widget.Toast;
import android.widget.Toolbar; import android.widget.Toolbar;
import androidx.annotation.NonNull;
import androidx.recyclerview.widget.RecyclerView;
import androidx.swiperefreshlayout.widget.SwipeRefreshLayout;
import androidx.viewpager2.widget.ViewPager2;
import org.joinmastodon.android.GlobalUserPreferences; import org.joinmastodon.android.GlobalUserPreferences;
import org.joinmastodon.android.R; import org.joinmastodon.android.R;
import org.joinmastodon.android.api.requests.accounts.GetAccountByID; import org.joinmastodon.android.api.requests.accounts.GetAccountByID;
@@ -79,6 +83,10 @@ import java.util.ArrayList;
import java.util.Collections; import java.util.Collections;
import java.util.List; import java.util.List;
import androidx.annotation.NonNull;
import androidx.recyclerview.widget.RecyclerView;
import androidx.swiperefreshlayout.widget.SwipeRefreshLayout;
import androidx.viewpager2.widget.ViewPager2;
import me.grishka.appkit.Nav; import me.grishka.appkit.Nav;
import me.grishka.appkit.api.Callback; import me.grishka.appkit.api.Callback;
import me.grishka.appkit.api.ErrorResponse; import me.grishka.appkit.api.ErrorResponse;
@@ -98,6 +106,7 @@ public class ProfileFragment extends LoaderFragment implements OnBackPressedList
private ImageView avatar; private ImageView avatar;
private CoverImageView cover; private CoverImageView cover;
private View avatarBorder; private View avatarBorder;
private Button botIcon;
private TextView name, username, bio, followersCount, followersLabel, followingCount, followingLabel, postsCount, postsLabel; private TextView name, username, bio, followersCount, followersLabel, followingCount, followingLabel, postsCount, postsLabel;
private ProgressBarButton actionButton, notifyButton; private ProgressBarButton actionButton, notifyButton;
private ViewPager2 pager; private ViewPager2 pager;
@@ -286,10 +295,6 @@ public class ProfileFragment extends LoaderFragment implements OnBackPressedList
followersBtn.setOnClickListener(this::onFollowersOrFollowingClick); followersBtn.setOnClickListener(this::onFollowersOrFollowingClick);
followingBtn.setOnClickListener(this::onFollowersOrFollowingClick); followingBtn.setOnClickListener(this::onFollowersOrFollowingClick);
if (account != null && account.bot) {
username.setCompoundDrawablesWithIntrinsicBounds(R.drawable.ic_fluent_bot_24_filled, 0, 0, 0);
}
username.setOnLongClickListener(v->{ username.setOnLongClickListener(v->{
String usernameString=account.acct; String usernameString=account.acct;
if(!usernameString.contains("@")){ if(!usernameString.contains("@")){
@@ -552,15 +557,14 @@ public class ProfileFragment extends LoaderFragment implements OnBackPressedList
if(relationship==null && !isOwnProfile) if(relationship==null && !isOwnProfile)
return; return;
inflater.inflate(isOwnProfile ? R.menu.profile_own : R.menu.profile, menu); inflater.inflate(isOwnProfile ? R.menu.profile_own : R.menu.profile, menu);
if(isOwnProfile){ UiUtils.enableOptionsMenuIcons(getActivity(), menu, R.id.bookmarks, R.id.followed_hashtags, R.id.favorites, R.id.scheduled, R.id.share, R.id.bot_icon);
UiUtils.enableOptionsMenuIcons(getActivity(), menu, R.id.bookmarks, R.id.followed_hashtags, R.id.favorites, R.id.scheduled, R.id.share);
}else{
UiUtils.enableOptionsMenuIcons(getActivity(), menu, R.id.bookmarks, R.id.followed_hashtags, R.id.favorites, R.id.scheduled);
}
menu.findItem(R.id.share).setTitle(getString(R.string.share_user, account.getShortUsername())); menu.findItem(R.id.share).setTitle(getString(R.string.share_user, account.getShortUsername()));
if(isOwnProfile) if(isOwnProfile)
return; return;
MenuItem botIcon = menu.findItem(R.id.bot_icon);
botIcon.setVisible(account.bot);
MenuItem mute = menu.findItem(R.id.mute); MenuItem mute = menu.findItem(R.id.mute);
mute.setTitle(getString(relationship.muting ? R.string.unmute_user : R.string.mute_user, account.getShortUsername())); mute.setTitle(getString(relationship.muting ? R.string.unmute_user : R.string.mute_user, account.getShortUsername()));
mute.setIcon(relationship.muting ? R.drawable.ic_fluent_speaker_0_24_regular : R.drawable.ic_fluent_speaker_off_24_regular); mute.setIcon(relationship.muting ? R.drawable.ic_fluent_speaker_0_24_regular : R.drawable.ic_fluent_speaker_off_24_regular);
@@ -647,6 +651,8 @@ public class ProfileFragment extends LoaderFragment implements OnBackPressedList
Bundle args=new Bundle(); Bundle args=new Bundle();
args.putString("account", accountID); args.putString("account", accountID);
Nav.go(getActivity(), ScheduledStatusListFragment.class, args); Nav.go(getActivity(), ScheduledStatusListFragment.class, args);
}else if(id==R.id.bot_icon){
Toast.makeText(getActivity(), R.string.sk_bot_account, Toast.LENGTH_LONG).show();
} }
return true; return true;
} }

View File

@@ -133,12 +133,7 @@ public class SettingsFragment extends MastodonToolbarFragment{
})); }));
items.add(new ButtonItem(R.string.sk_settings_publish_button_text, R.drawable.ic_fluent_send_24_regular, b->{ items.add(new ButtonItem(R.string.sk_settings_publish_button_text, R.drawable.ic_fluent_send_24_regular, b->{
updatePublishText(b); updatePublishText(b);
if (GlobalUserPreferences.relocatePublishButton) {
b.setOnClickListener(l -> {
Toast.makeText(getActivity(), R.string.sk_disable_relocate_publish_button_to_enable_customization,
Toast.LENGTH_LONG).show();
});
} else {
b.setOnClickListener(l->{ b.setOnClickListener(l->{
FrameLayout inputWrap = new FrameLayout(getContext()); FrameLayout inputWrap = new FrameLayout(getContext());
EditText input = new EditText(getContext()); EditText input = new EditText(getContext());
@@ -159,10 +154,9 @@ public class SettingsFragment extends MastodonToolbarFragment{
GlobalUserPreferences.save(); GlobalUserPreferences.save();
updatePublishText(b); updatePublishText(b);
}) })
.setNegativeButton(R.string.cancel, (d, which) -> { .setNegativeButton(R.string.cancel, (d, which) -> {})
})
.show(); .show();
});} });
})); }));
items.add(new SwitchItem(R.string.sk_settings_uniform_icon_for_notifications, R.drawable.ic_ntf_logo, GlobalUserPreferences.uniformNotificationIcon, i->{ items.add(new SwitchItem(R.string.sk_settings_uniform_icon_for_notifications, R.drawable.ic_ntf_logo, GlobalUserPreferences.uniformNotificationIcon, i->{
GlobalUserPreferences.uniformNotificationIcon=i.checked; GlobalUserPreferences.uniformNotificationIcon=i.checked;
@@ -243,10 +237,6 @@ public class SettingsFragment extends MastodonToolbarFragment{
items.add(new SwitchItem(R.string.notify_reblog, R.drawable.ic_fluent_arrow_repeat_all_24_regular, pushSubscription.alerts.reblog, i->onNotificationsChanged(PushNotification.Type.REBLOG, i.checked))); items.add(new SwitchItem(R.string.notify_reblog, R.drawable.ic_fluent_arrow_repeat_all_24_regular, pushSubscription.alerts.reblog, i->onNotificationsChanged(PushNotification.Type.REBLOG, i.checked)));
items.add(new SwitchItem(R.string.notify_mention, R.drawable.ic_fluent_mention_24_regular, pushSubscription.alerts.mention, i->onNotificationsChanged(PushNotification.Type.MENTION, i.checked))); items.add(new SwitchItem(R.string.notify_mention, R.drawable.ic_fluent_mention_24_regular, pushSubscription.alerts.mention, i->onNotificationsChanged(PushNotification.Type.MENTION, i.checked)));
items.add(new SwitchItem(R.string.sk_notify_posts, R.drawable.ic_fluent_alert_24_regular, pushSubscription.alerts.status, i->onNotificationsChanged(PushNotification.Type.STATUS, i.checked))); items.add(new SwitchItem(R.string.sk_notify_posts, R.drawable.ic_fluent_alert_24_regular, pushSubscription.alerts.status, i->onNotificationsChanged(PushNotification.Type.STATUS, i.checked)));
items.add(new SwitchItem(R.string.sk_keep_only_latest_notification, R.drawable.ic_fluent_custom_alert_latest_24_regular, GlobalUserPreferences.keepOnlyLatestNotification, i->{
GlobalUserPreferences.keepOnlyLatestNotification=i.checked;
GlobalUserPreferences.save();
}));
items.add(new HeaderItem(R.string.settings_account)); items.add(new HeaderItem(R.string.settings_account));
items.add(new TextItem(R.string.sk_settings_profile, ()->UiUtils.launchWebBrowser(getActivity(), "https://"+session.domain+"/settings/profile"), R.drawable.ic_fluent_open_24_regular)); items.add(new TextItem(R.string.sk_settings_profile, ()->UiUtils.launchWebBrowser(getActivity(), "https://"+session.domain+"/settings/profile"), R.drawable.ic_fluent_open_24_regular));

View File

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

View File

@@ -9,7 +9,6 @@ import android.os.Build;
import android.os.Bundle; import android.os.Bundle;
import android.text.SpannableStringBuilder; import android.text.SpannableStringBuilder;
import android.text.TextUtils; import android.text.TextUtils;
import android.util.Log;
import android.view.Menu; import android.view.Menu;
import android.view.MenuItem; import android.view.MenuItem;
import android.view.SubMenu; import android.view.SubMenu;
@@ -268,9 +267,6 @@ public class HeaderStatusDisplayItem extends StatusDisplayItem{
public void onBind(HeaderStatusDisplayItem item){ public void onBind(HeaderStatusDisplayItem item){
name.setText(item.parsedName); name.setText(item.parsedName);
username.setText('@'+item.user.acct); username.setText('@'+item.user.acct);
username.setCompoundDrawablesWithIntrinsicBounds(item.user.bot ? R.drawable.ic_fluent_bot_24_filled : 0, 0, 0, 0);
if (item.scheduledStatus!=null) if (item.scheduledStatus!=null)
if (item.scheduledStatus.scheduledAt.isAfter(CreateStatus.DRAFTS_AFTER_INSTANT)) { if (item.scheduledStatus.scheduledAt.isAfter(CreateStatus.DRAFTS_AFTER_INSTANT)) {
timestamp.setText(R.string.sk_draft); timestamp.setText(R.string.sk_draft);

View File

@@ -1,10 +1,8 @@
package org.joinmastodon.android.ui.text; package org.joinmastodon.android.ui.text;
import android.content.Context; import android.content.Context;
import android.content.Intent;
import android.text.TextPaint; import android.text.TextPaint;
import android.text.style.CharacterStyle; import android.text.style.CharacterStyle;
import android.util.Log;
import android.view.View; import android.view.View;
import org.joinmastodon.android.ui.utils.UiUtils; import org.joinmastodon.android.ui.utils.UiUtils;
@@ -44,14 +42,7 @@ public class LinkSpan extends CharacterStyle {
} }
public void onLongClick(View view) { public void onLongClick(View view) {
if (getType() == Type.URL) { UiUtils.copyText(view, getType() == Type.URL ? link : text);
Intent shareIntent = new Intent(Intent.ACTION_SEND)
.setType("text/plain")
.putExtra(Intent.EXTRA_TEXT, link);
view.getContext().startActivity(Intent.createChooser(shareIntent, null));
} else {
UiUtils.copyText(view, text);
}
} }
public String getLink(){ public String getLink(){

View File

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

View File

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

View File

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

View File

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

View File

@@ -1,5 +1,6 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<menu xmlns:android="http://schemas.android.com/apk/res/android"> <menu xmlns:android="http://schemas.android.com/apk/res/android">
<item android:id="@+id/bot_icon" android:title="@string/sk_bot_account" android:icon="@drawable/ic_fluent_bot_24_regular" android:showAsAction="always"/>
<item android:id="@+id/share" android:title="@string/share_user" android:icon="@drawable/ic_fluent_share_24_regular"/> <item android:id="@+id/share" android:title="@string/share_user" android:icon="@drawable/ic_fluent_share_24_regular"/>
<item android:id="@+id/mute" android:title="@string/mute_user" android:icon="@drawable/ic_fluent_speaker_mute_24_regular"/> <item android:id="@+id/mute" android:title="@string/mute_user" android:icon="@drawable/ic_fluent_speaker_mute_24_regular"/>
<item android:id="@+id/block" android:title="@string/block_user" android:icon="@drawable/ic_fluent_person_prohibited_24_regular"/> <item android:id="@+id/block" android:title="@string/block_user" android:icon="@drawable/ic_fluent_person_prohibited_24_regular"/>

View File

@@ -133,5 +133,5 @@
<string name="sk_no_image_desc_title">Keine Bildbeschreibung</string> <string name="sk_no_image_desc_title">Keine Bildbeschreibung</string>
<string name="sk_no_image_desc">Die enthaltenen Bilder haben keine Beschreibung. Bitte füge eine Beschreibung hinzu, damit auch sehbehinderte Personen teilnehmen können.</string> <string name="sk_no_image_desc">Die enthaltenen Bilder haben keine Beschreibung. Bitte füge eine Beschreibung hinzu, damit auch sehbehinderte Personen teilnehmen können.</string>
<string name="sk_emoji_recent">Kürzlich verwendet</string> <string name="sk_emoji_recent">Kürzlich verwendet</string>
<string name="sk_clear_recent_emoji">Kürzlich verwendete Emojis löschen</string> <string name="sk_clear_recent_emoji">Kürzlich verwendetes Emoji löschen</string>
</resources> </resources>

View File

@@ -37,7 +37,7 @@
<string name="sk_lists_with_user">Lists with %s</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_settings_always_reveal_content_warnings">Always reveal content warnings</string>
<string name="sk_disable_marquee">Disable scrolling text in title bars</string> <string name="sk_disable_marquee">Disable scrolling text in title bars</string>
<string name="sk_disable_dividers">Disable post dividers</string> <string name="sk_disable_dividers">Disable toot dividers</string>
<string name="sk_relocate_publish_button">Relocate publish button</string> <string name="sk_relocate_publish_button">Relocate publish button</string>
<string name="sk_settings_contribute">Contribute to Moshidon</string> <string name="sk_settings_contribute">Contribute to Moshidon</string>
<string name="sk_settings_show_federated_timeline">Show federated timeline</string> <string name="sk_settings_show_federated_timeline">Show federated timeline</string>
@@ -65,7 +65,7 @@
<string name="sk_welcome_title">Welcome!</string> <string name="sk_welcome_title">Welcome!</string>
<string name="sk_welcome_text">The shark salutes you! To get started, please enter your home instances domain name below.</string> <string name="sk_welcome_text">The shark salutes you! To get started, please enter your home instances domain name below.</string>
<string name="sk_example_domain">example.social</string> <string name="sk_example_domain">example.social</string>
<string name="sk_app_username" translatable="false">\@moshidon</string> <string name="sk_app_username" translatable="false">\@megalodon</string>
<string name="sk_tabs_disable_swipe">Disable swiping between tabs</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_profile">Set up profile</string>
<string name="sk_settings_posting">Posting preferences</string> <string name="sk_settings_posting">Posting preferences</string>
@@ -135,6 +135,4 @@
<string name="sk_no_image_desc">The included images have no description. Please consider adding one, to allow visually impaired people to participate.</string> <string name="sk_no_image_desc">The included images have no description. Please consider adding one, to allow visually impaired people to participate.</string>
<string name="sk_emoji_recent">Recently used</string> <string name="sk_emoji_recent">Recently used</string>
<string name="sk_clear_recent_emoji">Clear recently used emoji</string> <string name="sk_clear_recent_emoji">Clear recently used emoji</string>
<string name="sk_disable_relocate_publish_button_to_enable_customization">Disable "Relocate publish button" to allow customization</string>
<string name="sk_keep_only_latest_notification">Keep only latest notification</string>
</resources> </resources>

View File

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