Compare commits
21 Commits
1.1.4+fork
...
1.1.4+fork
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
91995155e9 | ||
|
|
aae0ff5aa7 | ||
|
|
821d9b8a5e | ||
|
|
2070aed38f | ||
|
|
986979eefc | ||
|
|
ed3ce54b24 | ||
|
|
c80ebf2eda | ||
|
|
1f4031da61 | ||
|
|
d0ebee74ca | ||
|
|
e8ec042d96 | ||
|
|
bd61bf32b6 | ||
|
|
ab7e6b3332 | ||
|
|
548da48615 | ||
|
|
198a7d5ad3 | ||
|
|
040f244e15 | ||
|
|
98bc6f14a9 | ||
|
|
b92e6d2c48 | ||
|
|
ac3875fe08 | ||
|
|
6fdbafc67b | ||
|
|
5aebdcaa6a | ||
|
|
2969a3e4fd |
@@ -9,8 +9,8 @@ android {
|
||||
applicationId "org.joinmastodon.android.moshinda"
|
||||
minSdk 23
|
||||
targetSdk 33
|
||||
versionCode 82
|
||||
versionName "1.1.4+fork.82.moshinda"
|
||||
versionCode 84
|
||||
versionName "1.1.4+fork.84.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"
|
||||
}
|
||||
|
||||
@@ -917,7 +917,18 @@ public class ComposeFragment extends MastodonToolbarFragment implements OnBackPr
|
||||
}
|
||||
|
||||
private void onPublishClick(View v){
|
||||
publish();
|
||||
if (!attachments.isEmpty()
|
||||
&& statusVisibility != StatusPrivacy.DIRECT
|
||||
&& !attachments.stream().allMatch(attachment -> attachment.description != null && !attachment.description.isBlank())) {
|
||||
new M3AlertDialogBuilder(getActivity())
|
||||
.setTitle(R.string.sk_no_image_desc_title)
|
||||
.setMessage(R.string.sk_no_image_desc)
|
||||
.setNegativeButton(R.string.cancel, null)
|
||||
.setPositiveButton(R.string.publish, (dialog, i)-> publish())
|
||||
.show();
|
||||
} else {
|
||||
publish();
|
||||
}
|
||||
}
|
||||
|
||||
private void publishErrorCallback(ErrorResponse error) {
|
||||
@@ -1030,6 +1041,7 @@ public class ComposeFragment extends MastodonToolbarFragment implements OnBackPr
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
if(editingStatus!=null && !redraftStatus){
|
||||
new EditStatus(req, editingStatus.id)
|
||||
.setCallback(resCallback)
|
||||
|
||||
@@ -1,11 +1,16 @@
|
||||
package org.joinmastodon.android.fragments;
|
||||
|
||||
import static android.content.Context.CLIPBOARD_SERVICE;
|
||||
|
||||
import android.animation.Animator;
|
||||
import android.animation.AnimatorListenerAdapter;
|
||||
import android.animation.AnimatorSet;
|
||||
import android.animation.ObjectAnimator;
|
||||
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;
|
||||
@@ -14,10 +19,11 @@ 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;
|
||||
import android.util.Log;
|
||||
import android.view.Gravity;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.Menu;
|
||||
@@ -32,6 +38,7 @@ import android.widget.Button;
|
||||
import android.widget.EditText;
|
||||
import android.widget.FrameLayout;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.LinearLayout;
|
||||
import android.widget.ProgressBar;
|
||||
import android.widget.RelativeLayout;
|
||||
import android.widget.TextView;
|
||||
@@ -97,9 +104,9 @@ public class ProfileFragment extends LoaderFragment implements OnBackPressedList
|
||||
private static final int COVER_RESULT=343;
|
||||
|
||||
private ImageView avatar;
|
||||
private Button botIcon;
|
||||
private CoverImageView cover;
|
||||
private View avatarBorder;
|
||||
private Button botIcon;
|
||||
private TextView name, username, bio, followersCount, followersLabel, followingCount, followingLabel, postsCount, postsLabel;
|
||||
private ProgressBarButton actionButton, notifyButton;
|
||||
private ViewPager2 pager;
|
||||
@@ -132,7 +139,6 @@ public class ProfileFragment extends LoaderFragment implements OnBackPressedList
|
||||
private WindowInsets childInsets;
|
||||
private PhotoViewer currentPhotoViewer;
|
||||
private boolean editModeLoading;
|
||||
private String prefilledText;
|
||||
|
||||
public ProfileFragment(){
|
||||
super(R.layout.loader_fragment_overlay_toolbar);
|
||||
@@ -157,8 +163,11 @@ public class ProfileFragment extends LoaderFragment implements OnBackPressedList
|
||||
if(!getArguments().getBoolean("noAutoLoad", false))
|
||||
loadData();
|
||||
}
|
||||
}
|
||||
|
||||
prefilledText = AccountSessionManager.getInstance().isSelf(accountID, account) ? null : '@'+account.acct+' ';
|
||||
private String getPrefilledText() {
|
||||
return account == null || AccountSessionManager.getInstance().isSelf(accountID, account)
|
||||
? null : '@'+account.acct+' ';
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -174,11 +183,6 @@ public class ProfileFragment extends LoaderFragment implements OnBackPressedList
|
||||
avatar=content.findViewById(R.id.avatar);
|
||||
cover=content.findViewById(R.id.cover);
|
||||
avatarBorder=content.findViewById(R.id.avatar_border);
|
||||
botIcon=content.findViewById(R.id.bot_icon);
|
||||
botIcon.setOnClickListener(v ->{
|
||||
Toast.makeText(getActivity(), R.string.sk_bot_account,
|
||||
Toast.LENGTH_LONG).show();
|
||||
});
|
||||
name=content.findViewById(R.id.name);
|
||||
username=content.findViewById(R.id.username);
|
||||
bio=content.findViewById(R.id.bio);
|
||||
@@ -188,6 +192,7 @@ public class ProfileFragment extends LoaderFragment implements OnBackPressedList
|
||||
followingCount=content.findViewById(R.id.following_count);
|
||||
followingLabel=content.findViewById(R.id.following_label);
|
||||
followingBtn=content.findViewById(R.id.following_btn);
|
||||
|
||||
postsCount=content.findViewById(R.id.posts_count);
|
||||
postsLabel=content.findViewById(R.id.posts_label);
|
||||
postsBtn=content.findViewById(R.id.posts_btn);
|
||||
@@ -271,15 +276,13 @@ public class ProfileFragment extends LoaderFragment implements OnBackPressedList
|
||||
}
|
||||
});
|
||||
|
||||
botIcon.setVisibility(account.bot ? View.VISIBLE : View.GONE);
|
||||
|
||||
actionButton.setOnClickListener(this::onActionButtonClick);
|
||||
notifyButton.setOnClickListener(this::onNotifyButtonClick);
|
||||
avatar.setOnClickListener(this::onAvatarClick);
|
||||
cover.setOnClickListener(this::onCoverClick);
|
||||
refreshLayout.setOnRefreshListener(this);
|
||||
fab.setOnClickListener(this::onFabClick);
|
||||
fab.setOnLongClickListener(v->UiUtils.pickAccountForCompose(getActivity(), accountID, prefilledText));
|
||||
fab.setOnLongClickListener(v->UiUtils.pickAccountForCompose(getActivity(), accountID, getPrefilledText()));
|
||||
|
||||
if(loaded){
|
||||
bindHeaderView();
|
||||
@@ -554,25 +557,28 @@ public class ProfileFragment extends LoaderFragment implements OnBackPressedList
|
||||
if(relationship==null && !isOwnProfile)
|
||||
return;
|
||||
inflater.inflate(isOwnProfile ? R.menu.profile_own : R.menu.profile, menu);
|
||||
// UiUtils.enableOptionsMenuIcons(getActivity(), menu, R.id.bookmarks, R.id.followed_hashtags);
|
||||
menu.findItem(R.id.share).setTitle(getString(R.string.share_user, account.getDisplayUsername()));
|
||||
UiUtils.enableOptionsMenuIcons(getActivity(), menu, R.id.bookmarks, R.id.followed_hashtags, R.id.favorites, R.id.scheduled, R.id.share, R.id.bot_icon);
|
||||
menu.findItem(R.id.share).setTitle(getString(R.string.share_user, account.getShortUsername()));
|
||||
if(isOwnProfile)
|
||||
return;
|
||||
|
||||
MenuItem botIcon = menu.findItem(R.id.bot_icon);
|
||||
botIcon.setVisible(account.bot);
|
||||
|
||||
MenuItem mute = menu.findItem(R.id.mute);
|
||||
mute.setTitle(getString(relationship.muting ? R.string.unmute_user : R.string.mute_user, account.getDisplayUsername()));
|
||||
mute.setIcon(relationship.muting ? R.drawable.ic_fluent_speaker_2_24_regular : R.drawable.ic_fluent_speaker_mute_24_regular);
|
||||
mute.setTitle(getString(relationship.muting ? R.string.unmute_user : R.string.mute_user, account.getShortUsername()));
|
||||
mute.setIcon(relationship.muting ? R.drawable.ic_fluent_speaker_0_24_regular : R.drawable.ic_fluent_speaker_off_24_regular);
|
||||
UiUtils.insetPopupMenuIcon(getContext(), mute);
|
||||
|
||||
menu.findItem(R.id.block).setTitle(getString(relationship.blocking ? R.string.unblock_user : R.string.block_user, account.getDisplayUsername()));
|
||||
menu.findItem(R.id.report).setTitle(getString(R.string.report_user, account.getDisplayUsername()));
|
||||
menu.findItem(R.id.block).setTitle(getString(relationship.blocking ? R.string.unblock_user : R.string.block_user, account.getShortUsername()));
|
||||
menu.findItem(R.id.report).setTitle(getString(R.string.report_user, account.getShortUsername()));
|
||||
MenuItem manageUserLists=menu.findItem(R.id.manage_user_lists);
|
||||
if(relationship.following) {
|
||||
MenuItem hideBoosts = menu.findItem(R.id.hide_boosts);
|
||||
hideBoosts.setTitle(getString(relationship.showingReblogs ? R.string.hide_boosts_from_user : R.string.show_boosts_from_user, account.getDisplayUsername()));
|
||||
hideBoosts.setTitle(getString(relationship.showingReblogs ? R.string.hide_boosts_from_user : R.string.show_boosts_from_user, account.getShortUsername()));
|
||||
hideBoosts.setIcon(relationship.showingReblogs ? R.drawable.ic_fluent_arrow_repeat_all_off_24_regular : R.drawable.ic_fluent_arrow_repeat_all_24_regular);
|
||||
UiUtils.insetPopupMenuIcon(getContext(), hideBoosts);
|
||||
manageUserLists.setTitle(getString(R.string.sk_lists_with_user, account.getDisplayUsername()));
|
||||
manageUserLists.setTitle(getString(R.string.sk_lists_with_user, account.getShortUsername()));
|
||||
manageUserLists.setVisible(true);
|
||||
}else {
|
||||
menu.findItem(R.id.hide_boosts).setVisible(false);
|
||||
@@ -645,6 +651,8 @@ public class ProfileFragment extends LoaderFragment implements OnBackPressedList
|
||||
Bundle args=new Bundle();
|
||||
args.putString("account", accountID);
|
||||
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;
|
||||
}
|
||||
@@ -956,7 +964,7 @@ public class ProfileFragment extends LoaderFragment implements OnBackPressedList
|
||||
private void onFabClick(View v){
|
||||
Bundle args=new Bundle();
|
||||
args.putString("account", accountID);
|
||||
if(prefilledText != null) args.putString("prefilledText", prefilledText);
|
||||
if(getPrefilledText() != null) args.putString("prefilledText", getPrefilledText());
|
||||
Nav.go(getActivity(), ComposeFragment.class, args);
|
||||
}
|
||||
|
||||
|
||||
@@ -32,7 +32,7 @@ public class LinkSpan extends CharacterStyle {
|
||||
public void updateDrawState(TextPaint tp) {
|
||||
tp.setColor(color=tp.linkColor);
|
||||
}
|
||||
|
||||
|
||||
public void onClick(Context context){
|
||||
switch(getType()){
|
||||
case URL -> UiUtils.openURL(context, accountID, link);
|
||||
@@ -45,7 +45,6 @@ public class LinkSpan extends CharacterStyle {
|
||||
UiUtils.copyText(view, getType() == Type.URL ? link : text);
|
||||
}
|
||||
|
||||
|
||||
public String getLink(){
|
||||
return link;
|
||||
}
|
||||
|
||||
@@ -176,18 +176,16 @@
|
||||
<FrameLayout
|
||||
android:clipToPadding="false"
|
||||
android:paddingVertical="16dp"
|
||||
android:paddingLeft="8dp"
|
||||
android:paddingLeft="16dp"
|
||||
android:paddingRight="4dp"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<org.joinmastodon.android.ui.views.ProgressBarButton
|
||||
android:id="@+id/notify_btn"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:drawableStart="@drawable/ic_fluent_alert_24_selector"
|
||||
android:paddingHorizontal="8dp"
|
||||
tools:ignore="SpeakableTextPresentCheck" />
|
||||
android:drawableStart="@drawable/ic_fluent_alert_24_selector" />
|
||||
|
||||
<ProgressBar
|
||||
android:id="@+id/notify_progress"
|
||||
@@ -200,7 +198,6 @@
|
||||
android:indeterminateTint="?colorButtonText"
|
||||
android:outlineProvider="none"
|
||||
android:visibility="gone" />
|
||||
|
||||
</FrameLayout>
|
||||
|
||||
<FrameLayout
|
||||
@@ -210,7 +207,6 @@
|
||||
android:paddingLeft="4dp"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<org.joinmastodon.android.ui.views.ProgressBarButton
|
||||
android:id="@+id/profile_action_btn"
|
||||
android:layout_width="wrap_content"
|
||||
@@ -231,44 +227,26 @@
|
||||
</FrameLayout>
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@id/name_wrap"
|
||||
android:layout_width="wrap_content"
|
||||
<TextView
|
||||
android:id="@+id/name"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_below="@id/avatar_border"
|
||||
android:layout_alignParentStart="true"
|
||||
android:layout_marginStart="16dp"
|
||||
android:layout_marginTop="17dp"
|
||||
android:layout_marginBottom="0.4dp"
|
||||
android:layout_toStartOf="@id/profile_action_btn_wrap"
|
||||
android:layout_alignParentEnd="true">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/name"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="16dp"
|
||||
android:layout_marginTop="17dp"
|
||||
android:layout_marginBottom="0.4dp"
|
||||
android:layout_marginEnd="0dp"
|
||||
android:textAlignment="viewStart"
|
||||
android:textAppearance="@style/m3_headline_small"
|
||||
tools:text="Eugen" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/bot_icon"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="28dp"
|
||||
android:layout_marginTop="14dp"
|
||||
android:paddingHorizontal="8dp"
|
||||
android:background="?colorWindowBackground"
|
||||
android:drawableStart="@drawable/ic_fluent_bot_24_regular"
|
||||
/>
|
||||
</LinearLayout>
|
||||
android:textAlignment="viewStart"
|
||||
android:textAppearance="@style/m3_headline_small"
|
||||
tools:text="Eugen" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/username"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="16dp"
|
||||
android:layout_below="@id/name_wrap"
|
||||
android:layout_below="@id/name"
|
||||
android:paddingTop="4dp"
|
||||
android:paddingBottom="8dp"
|
||||
android:textAppearance="@style/m3_title_medium"
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<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/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"/>
|
||||
|
||||
@@ -129,4 +129,6 @@
|
||||
<string name="sk_compose_no_schedule">Nicht planen</string>
|
||||
<string name="sk_compose_no_draft">Nicht entwerfen</string>
|
||||
<string name="sk_settings_reduce_motion">Bewegungen in Animationen reduzieren</string>
|
||||
</resources>
|
||||
<string name="sk_no_image_desc_title">Keine Bildbeschreibung</string>
|
||||
<string name="sk_no_image_desc">Die enthaltenen Bilder haben keine Beschreibung. Bitte fügen Sie eine Beschreibung hinzu, damit auch sehbehinderte Personen teilnehmen können.</string>
|
||||
</resources>
|
||||
|
||||
@@ -131,4 +131,6 @@
|
||||
<string name="sk_compose_no_draft">Don’t draft</string>
|
||||
<string name="sk_settings_reduce_motion">Reduce motion in animations</string>
|
||||
<string name="sk_bot_account">This is a bot account</string>
|
||||
<string name="sk_no_image_desc_title">No Image description</string>
|
||||
<string name="sk_no_image_desc">The included images have no description. Please consider adding one, to allow visually impaired people to participate.</string>
|
||||
</resources>
|
||||
@@ -3,7 +3,7 @@ Release 82 adds a lot of features from upstream, such as:
|
||||
- A settings page rework
|
||||
- The ability to choose the publish button text
|
||||
- The ability to reduce animations
|
||||
- A bot icon for bot account profiles
|
||||
- A bot icon for bot account profiles! Thanks @FineFindus
|
||||
- And updated German translation! Thanks @dantobi
|
||||
- A lot of minor UI improvements
|
||||
- Major usability improvements, as the ability to hold action buttons to interact with another account
|
||||
|
||||
4
metadata/en-US/changelogs/83.txt
Normal file
4
metadata/en-US/changelogs/83.txt
Normal file
@@ -0,0 +1,4 @@
|
||||
Release 83 brings some minor improvements, such as:
|
||||
- Fixing crashing issues when clicking mentions
|
||||
- Reworking the bot icon
|
||||
- Adding a reminder to add an image description if you post an attachment allow visually impaired people to better participate. Thanks @FineFindus!
|
||||
3
metadata/en-US/changelogs/84.txt
Normal file
3
metadata/en-US/changelogs/84.txt
Normal file
@@ -0,0 +1,3 @@
|
||||
Release 84 fixes a few bugs, such as:
|
||||
- Login callback not working
|
||||
- Updating german translation. Thanks @DanTobi!
|
||||
Reference in New Issue
Block a user