Loading app/src/main/java/app/fedilab/android/mastodon/activities/ProfileActivity.java +4 −0 Original line number Diff line number Diff line Loading @@ -58,6 +58,7 @@ import androidx.annotation.NonNull; import androidx.annotation.Nullable; import androidx.appcompat.app.ActionBar; import androidx.appcompat.app.AlertDialog; import androidx.appcompat.widget.TooltipCompat; import androidx.core.app.ActivityOptionsCompat; import androidx.core.content.ContextCompat; import androidx.lifecycle.ViewModelProvider; Loading Loading @@ -248,12 +249,15 @@ public class ProfileActivity extends BaseActivity { TabLayout.Tab followerTab = binding.accountTabLayout.getTabAt(2); if (statusTab != null) { statusTab.setText(getString(R.string.status_cnt, Helper.withSuffix(account.statuses_count))); TooltipCompat.setTooltipText(statusTab.view, String.valueOf(account.statuses_count)); } if (followingTab != null) { followingTab.setText(getString(R.string.following_cnt, Helper.withSuffix(account.following_count))); TooltipCompat.setTooltipText(followingTab.view, String.valueOf(account.following_count)); } if (followerTab != null) { followerTab.setText(getString(R.string.followers_cnt, Helper.withSuffix(account.followers_count))); TooltipCompat.setTooltipText(followerTab.view, String.valueOf(account.followers_count)); } } Loading app/src/main/java/app/fedilab/android/mastodon/helper/ZipHelper.java +8 −0 Original line number Diff line number Diff line Loading @@ -32,6 +32,8 @@ import android.widget.Toast; import androidx.preference.PreferenceManager; import com.google.android.material.dialog.MaterialAlertDialogBuilder; import java.io.BufferedInputStream; import java.io.BufferedOutputStream; import java.io.File; Loading Loading @@ -110,6 +112,12 @@ public class ZipHelper { Uri uri = Uri.parse("file://" + zipFile); intentOpen.setDataAndType(uri, "application/zip"); String title = context.getString(R.string.data_export_settings); new MaterialAlertDialogBuilder(context) .setTitle(R.string.export_settings) .setMessage(message + "\n\n" + uri.getPath()) .setIcon(R.drawable.ic_baseline_check_24) .setNeutralButton(R.string.close, (dialogInterface, i) -> dialogInterface.dismiss()) .show(); Helper.notify_user(context, Helper.getCurrentAccount(context), intentOpen, BitmapFactory.decodeResource(context.getResources(), getMainLogo(context)), Helper.NotifType.BACKUP, title, message); } Loading app/src/main/java/app/fedilab/android/mastodon/ui/drawer/StatusAdapter.java +5 −5 Original line number Diff line number Diff line Loading @@ -2228,11 +2228,11 @@ public class StatusAdapter extends RecyclerView.Adapter<RecyclerView.ViewHolder> // Executors.newSingleThreadScheduledExecutor().scheduleAtFixedRate(() -> holder.binding.statusContent.invalidate(), 0, 100, TimeUnit.MILLISECONDS); if (remote) { holder.binding.actionButtonMore.setVisibility(View.GONE); holder.binding.actionButtonMoreContainer.setVisibility(View.GONE); } else { holder.binding.actionButtonMore.setVisibility(View.VISIBLE); holder.binding.actionButtonMoreContainer.setVisibility(View.VISIBLE); } holder.binding.actionButtonMore.setOnClickListener(v -> { holder.binding.actionButtonMoreContainer.setOnClickListener(v -> { boolean isOwner = statusToDeal.account.id.compareTo(BaseMainActivity.currentUserID) == 0; PopupMenu popup = new PopupMenu(context, holder.binding.actionButtonMore); popup.getMenuInflater() Loading Loading @@ -2609,7 +2609,7 @@ public class StatusAdapter extends RecyclerView.Adapter<RecyclerView.ViewHolder> popup.show(); }); holder.binding.actionButtonReply.setOnLongClickListener(v -> { holder.binding.actionButtonReplyContainer.setOnLongClickListener(v -> { CrossActionHelper.doCrossAction(context, CrossActionHelper.TypeOfCrossAction.REPLY_ACTION, null, statusToDeal); return true; }); Loading @@ -2624,7 +2624,7 @@ public class StatusAdapter extends RecyclerView.Adapter<RecyclerView.ViewHolder> context.startActivity(intent); }); }); holder.binding.actionButtonReply.setOnClickListener(v -> { holder.binding.actionButtonReplyContainer.setOnClickListener(v -> { if (remote) { Toasty.info(context, context.getString(R.string.retrieve_remote_status), Toasty.LENGTH_SHORT).show(); searchVM.search(BaseMainActivity.currentInstance, BaseMainActivity.currentToken, statusToDeal.uri, null, "statuses", false, true, false, 0, null, null, 1) Loading app/src/main/res/layouts/mastodon/layout/drawer_status.xml +26 −19 Original line number Diff line number Diff line Loading @@ -653,10 +653,13 @@ android:clipChildren="false" android:clipToPadding="false"> <androidx.appcompat.widget.LinearLayoutCompat <RelativeLayout android:id="@+id/action_button_reply_container" android:layout_width="wrap_content" android:layout_width="48dp" android:layout_height="48dp" android:clickable="true" android:contentDescription="@string/reply" android:focusable="true" android:orientation="horizontal" app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintStart_toStartOf="parent" Loading @@ -667,26 +670,24 @@ android:id="@+id/action_button_reply" android:layout_width="28dp" android:layout_height="28dp" android:layout_gravity="center" android:layout_centerInParent="true" android:adjustViewBounds="true" android:background="@color/transparent" android:clickable="true" android:contentDescription="@string/reply" android:focusable="true" app:srcCompat="@drawable/ic_round_reply_24" /> <androidx.appcompat.widget.AppCompatTextView android:id="@+id/reply_count" android:layout_marginStart="10dp" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignParentEnd="true" android:layout_alignParentBottom="true" android:layout_gravity="bottom" android:layout_marginStart="10dp" android:text="+" android:textColor="?colorControlNormal" android:visibility="gone" tools:ignore="HardcodedText" tools:visibility="visible" /> </androidx.appcompat.widget.LinearLayoutCompat> </RelativeLayout> <androidx.appcompat.widget.LinearLayoutCompat Loading Loading @@ -864,26 +865,32 @@ android:src="@drawable/ic_baseline_add_reaction_24" android:visibility="gone" app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintEnd_toStartOf="@+id/action_button_more" app:layout_constraintEnd_toStartOf="@+id/action_button_more_container" app:layout_constraintStart_toEndOf="@+id/status_add_custom_emoji" app:layout_constraintTop_toTopOf="parent" tools:visibility="visible" /> <androidx.appcompat.widget.AppCompatImageView android:id="@+id/action_button_more" android:layout_width="28dp" android:layout_height="28dp" android:layout_gravity="center|end" android:adjustViewBounds="true" android:background="@color/transparent" <RelativeLayout android:id="@+id/action_button_more_container" android:layout_width="48dp" android:layout_height="48dp" android:clickable="true" android:contentDescription="@string/display_options" android:focusable="true" app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintEnd_toEndOf="parent" app:layout_constraintTop_toTopOf="parent" app:layout_constraintTop_toTopOf="parent"> <androidx.appcompat.widget.AppCompatImageView android:id="@+id/action_button_more" android:layout_width="28dp" android:layout_height="28dp" android:layout_centerInParent="true" android:adjustViewBounds="true" app:srcCompat="@drawable/ic_round_more_horiz_24" /> </RelativeLayout> </androidx.constraintlayout.widget.ConstraintLayout> <androidx.appcompat.widget.LinearLayoutCompat Loading app/src/main/res/values-gl/strings.xml +1 −0 Original line number Diff line number Diff line Loading @@ -1071,4 +1071,5 @@ <string name="toast_error_token_empty">O token non pode quedar baleiro!</string> <string name="use_token">Usar un token</string> <string name="toast_fail_authenticate">A app non se puido autenticar coa conta!</string> <string name="twitter_tags">Etiquetas de Twitter (con Nitter)</string> </resources> Loading
app/src/main/java/app/fedilab/android/mastodon/activities/ProfileActivity.java +4 −0 Original line number Diff line number Diff line Loading @@ -58,6 +58,7 @@ import androidx.annotation.NonNull; import androidx.annotation.Nullable; import androidx.appcompat.app.ActionBar; import androidx.appcompat.app.AlertDialog; import androidx.appcompat.widget.TooltipCompat; import androidx.core.app.ActivityOptionsCompat; import androidx.core.content.ContextCompat; import androidx.lifecycle.ViewModelProvider; Loading Loading @@ -248,12 +249,15 @@ public class ProfileActivity extends BaseActivity { TabLayout.Tab followerTab = binding.accountTabLayout.getTabAt(2); if (statusTab != null) { statusTab.setText(getString(R.string.status_cnt, Helper.withSuffix(account.statuses_count))); TooltipCompat.setTooltipText(statusTab.view, String.valueOf(account.statuses_count)); } if (followingTab != null) { followingTab.setText(getString(R.string.following_cnt, Helper.withSuffix(account.following_count))); TooltipCompat.setTooltipText(followingTab.view, String.valueOf(account.following_count)); } if (followerTab != null) { followerTab.setText(getString(R.string.followers_cnt, Helper.withSuffix(account.followers_count))); TooltipCompat.setTooltipText(followerTab.view, String.valueOf(account.followers_count)); } } Loading
app/src/main/java/app/fedilab/android/mastodon/helper/ZipHelper.java +8 −0 Original line number Diff line number Diff line Loading @@ -32,6 +32,8 @@ import android.widget.Toast; import androidx.preference.PreferenceManager; import com.google.android.material.dialog.MaterialAlertDialogBuilder; import java.io.BufferedInputStream; import java.io.BufferedOutputStream; import java.io.File; Loading Loading @@ -110,6 +112,12 @@ public class ZipHelper { Uri uri = Uri.parse("file://" + zipFile); intentOpen.setDataAndType(uri, "application/zip"); String title = context.getString(R.string.data_export_settings); new MaterialAlertDialogBuilder(context) .setTitle(R.string.export_settings) .setMessage(message + "\n\n" + uri.getPath()) .setIcon(R.drawable.ic_baseline_check_24) .setNeutralButton(R.string.close, (dialogInterface, i) -> dialogInterface.dismiss()) .show(); Helper.notify_user(context, Helper.getCurrentAccount(context), intentOpen, BitmapFactory.decodeResource(context.getResources(), getMainLogo(context)), Helper.NotifType.BACKUP, title, message); } Loading
app/src/main/java/app/fedilab/android/mastodon/ui/drawer/StatusAdapter.java +5 −5 Original line number Diff line number Diff line Loading @@ -2228,11 +2228,11 @@ public class StatusAdapter extends RecyclerView.Adapter<RecyclerView.ViewHolder> // Executors.newSingleThreadScheduledExecutor().scheduleAtFixedRate(() -> holder.binding.statusContent.invalidate(), 0, 100, TimeUnit.MILLISECONDS); if (remote) { holder.binding.actionButtonMore.setVisibility(View.GONE); holder.binding.actionButtonMoreContainer.setVisibility(View.GONE); } else { holder.binding.actionButtonMore.setVisibility(View.VISIBLE); holder.binding.actionButtonMoreContainer.setVisibility(View.VISIBLE); } holder.binding.actionButtonMore.setOnClickListener(v -> { holder.binding.actionButtonMoreContainer.setOnClickListener(v -> { boolean isOwner = statusToDeal.account.id.compareTo(BaseMainActivity.currentUserID) == 0; PopupMenu popup = new PopupMenu(context, holder.binding.actionButtonMore); popup.getMenuInflater() Loading Loading @@ -2609,7 +2609,7 @@ public class StatusAdapter extends RecyclerView.Adapter<RecyclerView.ViewHolder> popup.show(); }); holder.binding.actionButtonReply.setOnLongClickListener(v -> { holder.binding.actionButtonReplyContainer.setOnLongClickListener(v -> { CrossActionHelper.doCrossAction(context, CrossActionHelper.TypeOfCrossAction.REPLY_ACTION, null, statusToDeal); return true; }); Loading @@ -2624,7 +2624,7 @@ public class StatusAdapter extends RecyclerView.Adapter<RecyclerView.ViewHolder> context.startActivity(intent); }); }); holder.binding.actionButtonReply.setOnClickListener(v -> { holder.binding.actionButtonReplyContainer.setOnClickListener(v -> { if (remote) { Toasty.info(context, context.getString(R.string.retrieve_remote_status), Toasty.LENGTH_SHORT).show(); searchVM.search(BaseMainActivity.currentInstance, BaseMainActivity.currentToken, statusToDeal.uri, null, "statuses", false, true, false, 0, null, null, 1) Loading
app/src/main/res/layouts/mastodon/layout/drawer_status.xml +26 −19 Original line number Diff line number Diff line Loading @@ -653,10 +653,13 @@ android:clipChildren="false" android:clipToPadding="false"> <androidx.appcompat.widget.LinearLayoutCompat <RelativeLayout android:id="@+id/action_button_reply_container" android:layout_width="wrap_content" android:layout_width="48dp" android:layout_height="48dp" android:clickable="true" android:contentDescription="@string/reply" android:focusable="true" android:orientation="horizontal" app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintStart_toStartOf="parent" Loading @@ -667,26 +670,24 @@ android:id="@+id/action_button_reply" android:layout_width="28dp" android:layout_height="28dp" android:layout_gravity="center" android:layout_centerInParent="true" android:adjustViewBounds="true" android:background="@color/transparent" android:clickable="true" android:contentDescription="@string/reply" android:focusable="true" app:srcCompat="@drawable/ic_round_reply_24" /> <androidx.appcompat.widget.AppCompatTextView android:id="@+id/reply_count" android:layout_marginStart="10dp" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignParentEnd="true" android:layout_alignParentBottom="true" android:layout_gravity="bottom" android:layout_marginStart="10dp" android:text="+" android:textColor="?colorControlNormal" android:visibility="gone" tools:ignore="HardcodedText" tools:visibility="visible" /> </androidx.appcompat.widget.LinearLayoutCompat> </RelativeLayout> <androidx.appcompat.widget.LinearLayoutCompat Loading Loading @@ -864,26 +865,32 @@ android:src="@drawable/ic_baseline_add_reaction_24" android:visibility="gone" app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintEnd_toStartOf="@+id/action_button_more" app:layout_constraintEnd_toStartOf="@+id/action_button_more_container" app:layout_constraintStart_toEndOf="@+id/status_add_custom_emoji" app:layout_constraintTop_toTopOf="parent" tools:visibility="visible" /> <androidx.appcompat.widget.AppCompatImageView android:id="@+id/action_button_more" android:layout_width="28dp" android:layout_height="28dp" android:layout_gravity="center|end" android:adjustViewBounds="true" android:background="@color/transparent" <RelativeLayout android:id="@+id/action_button_more_container" android:layout_width="48dp" android:layout_height="48dp" android:clickable="true" android:contentDescription="@string/display_options" android:focusable="true" app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintEnd_toEndOf="parent" app:layout_constraintTop_toTopOf="parent" app:layout_constraintTop_toTopOf="parent"> <androidx.appcompat.widget.AppCompatImageView android:id="@+id/action_button_more" android:layout_width="28dp" android:layout_height="28dp" android:layout_centerInParent="true" android:adjustViewBounds="true" app:srcCompat="@drawable/ic_round_more_horiz_24" /> </RelativeLayout> </androidx.constraintlayout.widget.ConstraintLayout> <androidx.appcompat.widget.LinearLayoutCompat Loading
app/src/main/res/values-gl/strings.xml +1 −0 Original line number Diff line number Diff line Loading @@ -1071,4 +1071,5 @@ <string name="toast_error_token_empty">O token non pode quedar baleiro!</string> <string name="use_token">Usar un token</string> <string name="toast_fail_authenticate">A app non se puido autenticar coa conta!</string> <string name="twitter_tags">Etiquetas de Twitter (con Nitter)</string> </resources>