Merge remote-tracking branch 'tuskyapp/develop'
This commit is contained in:
commit
b2739828dc
|
@ -208,6 +208,7 @@ class TimelineDAOTest {
|
|||
favouritesCount = 2 * statusId.toInt(),
|
||||
reblogged = even,
|
||||
favourited = !even,
|
||||
bookmarked = false,
|
||||
sensitive = even,
|
||||
spoilerText = "spoier$statusId",
|
||||
visibility = Status.Visibility.PRIVATE,
|
||||
|
@ -236,6 +237,7 @@ class TimelineDAOTest {
|
|||
favouritesCount = 0,
|
||||
reblogged = false,
|
||||
favourited = false,
|
||||
bookmarked = false,
|
||||
sensitive = false,
|
||||
spoilerText = null,
|
||||
visibility = null,
|
||||
|
|
|
@ -20,7 +20,6 @@ import android.os.AsyncTask;
|
|||
import android.os.Bundle;
|
||||
import android.view.MenuItem;
|
||||
import android.view.View;
|
||||
import android.widget.TextView;
|
||||
|
||||
import androidx.annotation.Nullable;
|
||||
import androidx.appcompat.app.ActionBar;
|
||||
|
@ -41,6 +40,7 @@ import com.keylesspalace.tusky.db.TootDao;
|
|||
import com.keylesspalace.tusky.db.TootEntity;
|
||||
import com.keylesspalace.tusky.di.Injectable;
|
||||
import com.keylesspalace.tusky.util.SaveTootHelper;
|
||||
import com.keylesspalace.tusky.view.BackgroundMessageView;
|
||||
|
||||
import java.lang.ref.WeakReference;
|
||||
import java.lang.reflect.Type;
|
||||
|
@ -60,7 +60,7 @@ public final class SavedTootActivity extends BaseActivity implements SavedTootAd
|
|||
|
||||
// ui
|
||||
private SavedTootAdapter adapter;
|
||||
private TextView noContent;
|
||||
private BackgroundMessageView errorMessageView;
|
||||
|
||||
private List<TootEntity> toots = new ArrayList<>();
|
||||
@Nullable
|
||||
|
@ -95,7 +95,7 @@ public final class SavedTootActivity extends BaseActivity implements SavedTootAd
|
|||
}
|
||||
|
||||
RecyclerView recyclerView = findViewById(R.id.recyclerView);
|
||||
noContent = findViewById(R.id.no_content);
|
||||
errorMessageView = findViewById(R.id.errorMessageView);
|
||||
recyclerView.setHasFixedSize(true);
|
||||
LinearLayoutManager layoutManager = new LinearLayoutManager(this);
|
||||
recyclerView.setLayoutManager(layoutManager);
|
||||
|
@ -136,9 +136,10 @@ public final class SavedTootActivity extends BaseActivity implements SavedTootAd
|
|||
|
||||
private void setNoContent(int size) {
|
||||
if (size == 0) {
|
||||
noContent.setVisibility(View.VISIBLE);
|
||||
errorMessageView.setup(R.drawable.elephant_friend_empty, R.string.no_saved_status, null);
|
||||
errorMessageView.setVisibility(View.VISIBLE);
|
||||
} else {
|
||||
noContent.setVisibility(View.INVISIBLE);
|
||||
errorMessageView.setVisibility(View.GONE);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -28,10 +28,9 @@ import android.text.style.StyleSpan;
|
|||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.CompoundButton;
|
||||
import android.widget.Button;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.TextView;
|
||||
import android.widget.ToggleButton;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.annotation.Nullable;
|
||||
|
@ -336,7 +335,7 @@ public class NotificationsAdapter extends RecyclerView.Adapter {
|
|||
}
|
||||
|
||||
private static class StatusNotificationViewHolder extends RecyclerView.ViewHolder
|
||||
implements View.OnClickListener, ToggleButton.OnCheckedChangeListener {
|
||||
implements View.OnClickListener {
|
||||
private final TextView message;
|
||||
private final View statusNameBar;
|
||||
private final TextView displayName;
|
||||
|
@ -346,8 +345,8 @@ public class NotificationsAdapter extends RecyclerView.Adapter {
|
|||
private final ImageView statusAvatar;
|
||||
private final ImageView notificationAvatar;
|
||||
private final TextView contentWarningDescriptionTextView;
|
||||
private final ToggleButton contentWarningButton;
|
||||
private final ToggleButton contentCollapseButton; // TODO: This code SHOULD be based on StatusBaseViewHolder
|
||||
private final Button contentWarningButton;
|
||||
private final Button contentCollapseButton; // TODO: This code SHOULD be based on StatusBaseViewHolder
|
||||
private ConstraintLayout quoteContainer;
|
||||
private StatusDisplayOptions statusDisplayOptions;
|
||||
|
||||
|
@ -382,7 +381,6 @@ public class NotificationsAdapter extends RecyclerView.Adapter {
|
|||
itemView.setOnClickListener(this);
|
||||
message.setOnClickListener(this);
|
||||
statusContent.setOnClickListener(this);
|
||||
contentWarningButton.setOnCheckedChangeListener(this);
|
||||
shortSdf = new SimpleDateFormat("HH:mm:ss", Locale.getDefault());
|
||||
longSdf = new SimpleDateFormat("MM/dd HH:mm:ss", Locale.getDefault());
|
||||
}
|
||||
|
@ -488,6 +486,14 @@ public class NotificationsAdapter extends RecyclerView.Adapter {
|
|||
boolean hasSpoiler = !TextUtils.isEmpty(statusViewData.getSpoilerText());
|
||||
contentWarningDescriptionTextView.setVisibility(hasSpoiler ? View.VISIBLE : View.GONE);
|
||||
contentWarningButton.setVisibility(hasSpoiler ? View.VISIBLE : View.GONE);
|
||||
|
||||
contentWarningButton.setOnClickListener(view -> {
|
||||
if (getAdapterPosition() != RecyclerView.NO_POSITION) {
|
||||
notificationActionListener.onExpandedChange(!statusViewData.isExpanded(), getAdapterPosition());
|
||||
}
|
||||
statusContent.setVisibility(statusViewData.isExpanded() ? View.GONE : View.VISIBLE);
|
||||
});
|
||||
|
||||
setupContentAndSpoiler(notificationViewData, listener);
|
||||
}
|
||||
|
||||
|
@ -553,19 +559,19 @@ public class NotificationsAdapter extends RecyclerView.Adapter {
|
|||
List<Emoji> emojis = statusViewData.getStatusEmojis();
|
||||
|
||||
if (statusViewData.isCollapsible() && (notificationViewData.isExpanded() || !hasSpoiler)) {
|
||||
contentCollapseButton.setOnCheckedChangeListener((buttonView, isChecked) -> {
|
||||
contentCollapseButton.setOnClickListener(view -> {
|
||||
int position = getAdapterPosition();
|
||||
if (position != RecyclerView.NO_POSITION && notificationActionListener != null) {
|
||||
notificationActionListener.onNotificationContentCollapsedChange(isChecked, position);
|
||||
notificationActionListener.onNotificationContentCollapsedChange(statusViewData.isCollapsed(), position);
|
||||
}
|
||||
});
|
||||
|
||||
contentCollapseButton.setVisibility(View.VISIBLE);
|
||||
if (statusViewData.isCollapsed()) {
|
||||
contentCollapseButton.setChecked(true);
|
||||
contentCollapseButton.setText(R.string.status_content_warning_show_more);
|
||||
statusContent.setFilters(COLLAPSE_INPUT_FILTER);
|
||||
} else {
|
||||
contentCollapseButton.setChecked(false);
|
||||
contentCollapseButton.setText(R.string.status_content_warning_show_less);
|
||||
statusContent.setFilters(NO_INPUT_FILTER);
|
||||
}
|
||||
} else {
|
||||
|
@ -584,12 +590,5 @@ public class NotificationsAdapter extends RecyclerView.Adapter {
|
|||
setQuoteContainer(statusViewData.getQuote(), listener);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {
|
||||
if (getAdapterPosition() != RecyclerView.NO_POSITION) {
|
||||
notificationActionListener.onExpandedChange(isChecked, getAdapterPosition());
|
||||
}
|
||||
statusContent.setVisibility(isChecked ? View.VISIBLE : View.GONE);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -15,7 +15,6 @@ import android.widget.ImageButton;
|
|||
import android.widget.ImageView;
|
||||
import android.widget.TextView;
|
||||
import android.widget.Toast;
|
||||
import android.widget.ToggleButton;
|
||||
|
||||
import androidx.annotation.DrawableRes;
|
||||
import androidx.annotation.NonNull;
|
||||
|
@ -26,6 +25,7 @@ import androidx.recyclerview.widget.LinearLayoutManager;
|
|||
import androidx.recyclerview.widget.RecyclerView;
|
||||
|
||||
import com.bumptech.glide.Glide;
|
||||
import com.google.android.material.button.MaterialButton;
|
||||
import com.keylesspalace.tusky.R;
|
||||
import com.keylesspalace.tusky.entity.Attachment;
|
||||
import com.keylesspalace.tusky.entity.Attachment.Focus;
|
||||
|
@ -79,7 +79,7 @@ public abstract class StatusBaseViewHolder extends RecyclerView.ViewHolder {
|
|||
private TextView sensitiveMediaWarning;
|
||||
private View sensitiveMediaShow;
|
||||
protected TextView[] mediaLabels;
|
||||
private ToggleButton contentWarningButton;
|
||||
private MaterialButton contentWarningButton;
|
||||
private ImageView avatarInset;
|
||||
|
||||
public ImageView avatar;
|
||||
|
@ -184,7 +184,7 @@ public abstract class StatusBaseViewHolder extends RecyclerView.ViewHolder {
|
|||
}
|
||||
|
||||
public void toggleContentWarning() {
|
||||
contentWarningButton.toggle();
|
||||
contentWarningButton.performClick();
|
||||
}
|
||||
|
||||
protected void setSpoilerAndContent(boolean expanded,
|
||||
|
@ -205,18 +205,28 @@ public abstract class StatusBaseViewHolder extends RecyclerView.ViewHolder {
|
|||
contentWarningDescription.setText(emojiSpoiler);
|
||||
contentWarningDescription.setVisibility(View.VISIBLE);
|
||||
contentWarningButton.setVisibility(View.VISIBLE);
|
||||
contentWarningButton.setChecked(expanded);
|
||||
contentWarningButton.setOnCheckedChangeListener((buttonView, isChecked) -> {
|
||||
setContentWarningButtonText(expanded);
|
||||
contentWarningButton.setOnClickListener( view -> {
|
||||
contentWarningDescription.invalidate();
|
||||
if (getAdapterPosition() != RecyclerView.NO_POSITION) {
|
||||
listener.onExpandedChange(isChecked, getAdapterPosition());
|
||||
listener.onExpandedChange(!expanded, getAdapterPosition());
|
||||
}
|
||||
this.setTextVisible(isChecked, content, mentions, emojis, poll, statusDisplayOptions, listener, removeQuote);
|
||||
setContentWarningButtonText(!expanded);
|
||||
|
||||
this.setTextVisible(!expanded, content, mentions, emojis, poll, statusDisplayOptions, listener, removeQuote);
|
||||
});
|
||||
this.setTextVisible(expanded, content, mentions, emojis, poll, statusDisplayOptions, listener, removeQuote);
|
||||
}
|
||||
}
|
||||
|
||||
private void setContentWarningButtonText(boolean expanded) {
|
||||
if(expanded) {
|
||||
contentWarningButton.setText(R.string.status_content_warning_show_less);
|
||||
} else {
|
||||
contentWarningButton.setText(R.string.status_content_warning_show_more);
|
||||
}
|
||||
}
|
||||
|
||||
private void setTextVisible(boolean expanded,
|
||||
Spanned content,
|
||||
Status.Mention[] mentions,
|
||||
|
@ -566,16 +576,12 @@ public abstract class StatusBaseViewHolder extends RecyclerView.ViewHolder {
|
|||
setAttachmentClickListener(imageView, listener, i, attachment, true);
|
||||
}
|
||||
|
||||
|
||||
final String hiddenContentText;
|
||||
if (sensitive) {
|
||||
hiddenContentText = context.getString(R.string.status_sensitive_media_title);
|
||||
sensitiveMediaWarning.setText(R.string.status_sensitive_media_title);
|
||||
} else {
|
||||
hiddenContentText = context.getString(R.string.status_media_hidden_title);
|
||||
sensitiveMediaWarning.setText(R.string.status_media_hidden_title);
|
||||
}
|
||||
|
||||
sensitiveMediaWarning.setText(HtmlUtils.fromHtml(hiddenContentText));
|
||||
|
||||
sensitiveMediaWarning.setVisibility(showingContent ? View.GONE : View.VISIBLE);
|
||||
sensitiveMediaShow.setVisibility(showingContent ? View.VISIBLE : View.GONE);
|
||||
sensitiveMediaShow.setOnClickListener(v -> {
|
||||
|
|
|
@ -19,8 +19,8 @@ import android.content.Context;
|
|||
import android.text.InputFilter;
|
||||
import android.text.TextUtils;
|
||||
import android.view.View;
|
||||
import android.widget.Button;
|
||||
import android.widget.TextView;
|
||||
import android.widget.ToggleButton;
|
||||
|
||||
import androidx.annotation.Nullable;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
|
@ -38,7 +38,7 @@ public class StatusViewHolder extends StatusBaseViewHolder {
|
|||
private static final InputFilter[] NO_INPUT_FILTER = new InputFilter[0];
|
||||
|
||||
private TextView statusInfo;
|
||||
private ToggleButton contentCollapseButton;
|
||||
private Button contentCollapseButton;
|
||||
|
||||
public StatusViewHolder(View itemView) {
|
||||
super(itemView);
|
||||
|
@ -96,18 +96,18 @@ public class StatusViewHolder extends StatusBaseViewHolder {
|
|||
private void setupCollapsedState(final StatusViewData.Concrete status, final StatusActionListener listener) {
|
||||
/* input filter for TextViews have to be set before text */
|
||||
if (status.isCollapsible() && (status.isExpanded() || TextUtils.isEmpty(status.getSpoilerText()))) {
|
||||
contentCollapseButton.setOnCheckedChangeListener((buttonView, isChecked) -> {
|
||||
contentCollapseButton.setOnClickListener(view -> {
|
||||
int position = getAdapterPosition();
|
||||
if (position != RecyclerView.NO_POSITION)
|
||||
listener.onContentCollapsedChange(isChecked, position);
|
||||
listener.onContentCollapsedChange(!status.isCollapsed(), position);
|
||||
});
|
||||
|
||||
contentCollapseButton.setVisibility(View.VISIBLE);
|
||||
if (status.isCollapsed()) {
|
||||
contentCollapseButton.setChecked(true);
|
||||
contentCollapseButton.setText(R.string.status_content_warning_show_more);
|
||||
content.setFilters(COLLAPSE_INPUT_FILTER);
|
||||
} else {
|
||||
contentCollapseButton.setChecked(false);
|
||||
contentCollapseButton.setText(R.string.status_content_warning_show_less);
|
||||
content.setFilters(NO_INPUT_FILTER);
|
||||
}
|
||||
} else {
|
||||
|
|
|
@ -19,9 +19,9 @@ import android.content.Context;
|
|||
import android.text.InputFilter;
|
||||
import android.text.TextUtils;
|
||||
import android.view.View;
|
||||
import android.widget.Button;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.TextView;
|
||||
import android.widget.ToggleButton;
|
||||
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
|
||||
|
@ -41,7 +41,7 @@ public class ConversationViewHolder extends StatusBaseViewHolder {
|
|||
private static final InputFilter[] NO_INPUT_FILTER = new InputFilter[0];
|
||||
|
||||
private TextView conversationNameTextView;
|
||||
private ToggleButton contentCollapseButton;
|
||||
private Button contentCollapseButton;
|
||||
private ImageView[] avatars;
|
||||
|
||||
private StatusDisplayOptions statusDisplayOptions;
|
||||
|
@ -145,18 +145,18 @@ public class ConversationViewHolder extends StatusBaseViewHolder {
|
|||
private void setupCollapsedState(boolean collapsible, boolean collapsed, boolean expanded, String spoilerText, final StatusActionListener listener) {
|
||||
/* input filter for TextViews have to be set before text */
|
||||
if (collapsible && (expanded || TextUtils.isEmpty(spoilerText))) {
|
||||
contentCollapseButton.setOnCheckedChangeListener((buttonView, isChecked) -> {
|
||||
contentCollapseButton.setOnClickListener(view -> {
|
||||
int position = getAdapterPosition();
|
||||
if (position != RecyclerView.NO_POSITION)
|
||||
listener.onContentCollapsedChange(isChecked, position);
|
||||
listener.onContentCollapsedChange(!collapsed, position);
|
||||
});
|
||||
|
||||
contentCollapseButton.setVisibility(View.VISIBLE);
|
||||
if (collapsed) {
|
||||
contentCollapseButton.setChecked(true);
|
||||
contentCollapseButton.setText(R.string.status_content_warning_show_more);
|
||||
content.setFilters(COLLAPSE_INPUT_FILTER);
|
||||
} else {
|
||||
contentCollapseButton.setChecked(false);
|
||||
contentCollapseButton.setText(R.string.status_content_warning_show_less);
|
||||
content.setFilters(NO_INPUT_FILTER);
|
||||
}
|
||||
} else {
|
||||
|
|
|
@ -94,13 +94,15 @@ class StatusViewHolder(
|
|||
itemView.statusContentWarningDescription.text = emojiSpoiler
|
||||
itemView.statusContentWarningDescription.show()
|
||||
itemView.statusContentWarningButton.show()
|
||||
itemView.statusContentWarningButton.isChecked = viewState.isContentShow(status.id, true)
|
||||
itemView.statusContentWarningButton.setOnCheckedChangeListener { _, isViewChecked ->
|
||||
setContentWarningButtonText(viewState.isContentShow(status.id, true))
|
||||
itemView.statusContentWarningButton.setOnClickListener {
|
||||
status()?.let { status ->
|
||||
val contentShown = viewState.isContentShow(status.id, true)
|
||||
itemView.statusContentWarningDescription.invalidate()
|
||||
viewState.setContentShow(status.id, isViewChecked)
|
||||
setTextVisible(isViewChecked, status.content, status.mentions, status.emojis, adapterHandler,
|
||||
viewState.setContentShow(status.id, !contentShown)
|
||||
setTextVisible(!contentShown, status.content, status.mentions, status.emojis, adapterHandler,
|
||||
status.quote != null)
|
||||
setContentWarningButtonText(!contentShown)
|
||||
}
|
||||
}
|
||||
setTextVisible(viewState.isContentShow(status.id, true), status.content, status.mentions, status.emojis, adapterHandler,
|
||||
|
@ -109,6 +111,13 @@ class StatusViewHolder(
|
|||
}
|
||||
}
|
||||
|
||||
private fun setContentWarningButtonText(contentShown: Boolean) {
|
||||
if(contentShown) {
|
||||
itemView.statusContentWarningButton.setText(R.string.status_content_warning_show_less)
|
||||
} else {
|
||||
itemView.statusContentWarningButton.setText(R.string.status_content_warning_show_more)
|
||||
}
|
||||
}
|
||||
|
||||
private fun setTextVisible(expanded: Boolean,
|
||||
content: Spanned,
|
||||
|
@ -148,19 +157,19 @@ class StatusViewHolder(
|
|||
private fun setupCollapsedState(collapsible: Boolean, collapsed: Boolean, expanded: Boolean, spoilerText: String) {
|
||||
/* input filter for TextViews have to be set before text */
|
||||
if (collapsible && (expanded || TextUtils.isEmpty(spoilerText))) {
|
||||
itemView.buttonToggleContent.setOnCheckedChangeListener { _, isChecked ->
|
||||
itemView.buttonToggleContent.setOnClickListener{
|
||||
status()?.let { status ->
|
||||
viewState.setCollapsed(status.id, isChecked)
|
||||
viewState.setCollapsed(status.id, !collapsed)
|
||||
updateTextView()
|
||||
}
|
||||
}
|
||||
|
||||
itemView.buttonToggleContent.show()
|
||||
if (collapsed) {
|
||||
itemView.buttonToggleContent.isChecked = true
|
||||
itemView.buttonToggleContent.setText(R.string.status_content_show_more)
|
||||
itemView.statusContent.filters = COLLAPSE_INPUT_FILTER
|
||||
} else {
|
||||
itemView.buttonToggleContent.isChecked = false
|
||||
itemView.buttonToggleContent.setText(R.string.status_content_show_less)
|
||||
itemView.statusContent.filters = NO_INPUT_FILTER
|
||||
}
|
||||
} else {
|
||||
|
|
|
@ -95,6 +95,7 @@ public abstract class SFragment extends BaseFragment implements Injectable {
|
|||
private static List<Filter> filters;
|
||||
private boolean filterRemoveRegex;
|
||||
private Matcher filterRemoveRegexMatcher;
|
||||
private static Matcher alphanumeric = Pattern.compile("^\\w+$").matcher("");
|
||||
|
||||
@Inject
|
||||
public MastodonApi mastodonApi;
|
||||
|
@ -550,8 +551,11 @@ public abstract class SFragment extends BaseFragment implements Injectable {
|
|||
}
|
||||
|
||||
private static String filterToRegexToken(Filter filter) {
|
||||
String phrase = Pattern.quote(filter.getPhrase());
|
||||
return filter.getWholeWord() ? String.format("(^|\\W)%s($|\\W)", phrase) : phrase;
|
||||
String phrase = filter.getPhrase();
|
||||
String quotedPhrase = Pattern.quote(phrase);
|
||||
return (filter.getWholeWord() && alphanumeric.reset(phrase).matches()) ? // "whole word" should only apply to alphanumeric filters, #1543
|
||||
String.format("(^|\\W)%s($|\\W)", quotedPhrase) :
|
||||
quotedPhrase;
|
||||
}
|
||||
|
||||
public static void flushFilters() {
|
||||
|
|
|
@ -6,9 +6,9 @@ import android.text.TextUtils;
|
|||
import android.view.View;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.TextView;
|
||||
import android.widget.ToggleButton;
|
||||
|
||||
import com.bumptech.glide.Glide;
|
||||
import com.google.android.material.button.MaterialButton;
|
||||
import com.keylesspalace.tusky.R;
|
||||
import com.keylesspalace.tusky.entity.Account;
|
||||
import com.keylesspalace.tusky.entity.Emoji;
|
||||
|
@ -27,7 +27,7 @@ public class QuoteInlineHelper {
|
|||
private TextView quoteDisplayName;
|
||||
private TextView quoteUsername;
|
||||
private TextView quoteContentWarningDescription;
|
||||
private ToggleButton quoteContentWarningButton;
|
||||
private MaterialButton quoteContentWarningButton;
|
||||
private TextView quoteContent;
|
||||
private TextView quoteMedia;
|
||||
|
||||
|
@ -82,11 +82,19 @@ public class QuoteInlineHelper {
|
|||
quoteContentWarningDescription.setText(emojiSpoiler);
|
||||
quoteContentWarningDescription.setVisibility(View.VISIBLE);
|
||||
quoteContentWarningButton.setVisibility(View.VISIBLE);
|
||||
quoteContentWarningButton.setChecked(false);
|
||||
quoteContentWarningButton.setOnCheckedChangeListener((buttonView, isChecked)
|
||||
-> quoteContent.setVisibility(isChecked ? View.VISIBLE : View.GONE));
|
||||
quoteContent.setVisibility(View.GONE);
|
||||
quoteContentWarningButton.setOnClickListener(v
|
||||
-> setContentVisibility(!(quoteContent.getVisibility() == View.VISIBLE)));
|
||||
setContentVisibility(false);
|
||||
}
|
||||
|
||||
private void setContentVisibility(boolean show) {
|
||||
if (show) {
|
||||
quoteContent.setVisibility(View.VISIBLE);
|
||||
quoteContentWarningButton.setText(R.string.status_content_warning_show_less);
|
||||
} else {
|
||||
quoteContent.setVisibility(View.GONE);
|
||||
quoteContentWarningButton.setText(R.string.status_content_warning_show_more);
|
||||
}
|
||||
}
|
||||
|
||||
private void hideSpoilerText() {
|
||||
|
|
|
@ -3,4 +3,4 @@
|
|||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:drawable="@drawable/poll_option_shape"
|
||||
android:clipOrientation="horizontal"
|
||||
android:gravity="left|clip_horizontal|fill_vertical"/>
|
||||
android:gravity="start|clip_horizontal|fill_vertical"/>
|
|
@ -2,5 +2,6 @@
|
|||
<shape
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:shape="rectangle">
|
||||
<corners android:radius="6dp"/>
|
||||
<solid android:color="?attr/pollOptionBackgroundColor" />
|
||||
</shape>
|
|
@ -1,6 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:shape="rectangle">
|
||||
<solid android:color="@color/color_background_dark" />
|
||||
<corners android:radius="4dp" />
|
||||
</shape>
|
|
@ -1,6 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:shape="rectangle">
|
||||
<solid android:color="#dedede" />
|
||||
<corners android:radius="4dp" />
|
||||
</shape>
|
|
@ -14,19 +14,21 @@
|
|||
android:layout_height="match_parent"
|
||||
app:layout_behavior="@string/appbar_scrolling_view_behavior">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/no_content"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_centerInParent="true"
|
||||
android:text="@string/no_content"
|
||||
android:visibility="invisible" />
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/recyclerView"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent" />
|
||||
|
||||
<com.keylesspalace.tusky.view.BackgroundMessageView
|
||||
android:id="@+id/errorMessageView"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_centerInParent="true"
|
||||
android:src="@android:color/transparent"
|
||||
android:visibility="gone"
|
||||
tools:src="@drawable/elephant_error"
|
||||
tools:visibility="visible" />
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
</androidx.coordinatorlayout.widget.CoordinatorLayout>
|
||||
</androidx.coordinatorlayout.widget.CoordinatorLayout>
|
||||
|
|
|
@ -136,13 +136,13 @@
|
|||
tools:text="content warning which is very long and it doesn't fit"
|
||||
tools:visibility="visible" />
|
||||
|
||||
<ToggleButton
|
||||
<Button
|
||||
android:id="@+id/status_content_warning_button"
|
||||
style="@style/TuskyButton.Outlined"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="4dp"
|
||||
android:layout_marginBottom="4dp"
|
||||
android:background="?attr/content_warning_button"
|
||||
android:minWidth="150dp"
|
||||
android:minHeight="0dp"
|
||||
android:paddingLeft="16dp"
|
||||
|
@ -150,12 +150,11 @@
|
|||
android:paddingRight="16dp"
|
||||
android:paddingBottom="4dp"
|
||||
android:textAllCaps="true"
|
||||
android:textOff="@string/status_content_warning_show_more"
|
||||
android:textOn="@string/status_content_warning_show_less"
|
||||
android:textSize="?attr/status_text_medium"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintStart_toStartOf="@id/status_display_name"
|
||||
app:layout_constraintTop_toBottomOf="@id/status_content_warning_description"
|
||||
tools:text="@string/status_content_warning_show_more"
|
||||
tools:visibility="visible" />
|
||||
|
||||
<androidx.emoji.widget.EmojiTextView
|
||||
|
@ -172,13 +171,13 @@
|
|||
app:layout_constraintTop_toBottomOf="@id/status_content_warning_button"
|
||||
tools:text="This is a status" />
|
||||
|
||||
<ToggleButton
|
||||
<Button
|
||||
android:id="@+id/button_toggle_content"
|
||||
style="@style/TuskyButton.Outlined"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="4dp"
|
||||
android:layout_marginBottom="4dp"
|
||||
android:background="?attr/content_warning_button"
|
||||
android:minWidth="150dp"
|
||||
android:minHeight="0dp"
|
||||
android:paddingLeft="16dp"
|
||||
|
@ -186,12 +185,11 @@
|
|||
android:paddingRight="16dp"
|
||||
android:paddingBottom="4dp"
|
||||
android:textAllCaps="true"
|
||||
android:textOff="@string/status_content_show_less"
|
||||
android:textOn="@string/status_content_show_more"
|
||||
android:textSize="?attr/status_text_medium"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintStart_toStartOf="@id/status_display_name"
|
||||
app:layout_constraintTop_toBottomOf="@id/status_content"
|
||||
tools:text="@string/status_content_show_less"
|
||||
tools:visibility="visible" />
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
|
@ -225,7 +223,6 @@
|
|||
app:layout_constraintTop_toTopOf="parent"
|
||||
tools:ignore="ContentDescription" />
|
||||
|
||||
|
||||
<com.keylesspalace.tusky.view.MediaPreviewImageView
|
||||
android:id="@+id/status_media_preview_2"
|
||||
android:layout_width="0dp"
|
||||
|
@ -384,7 +381,6 @@
|
|||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/status_media_label_2" />
|
||||
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
|
@ -398,13 +394,12 @@
|
|||
app:layout_constraintStart_toStartOf="@id/status_display_name"
|
||||
app:layout_constraintTop_toBottomOf="@id/status_media_preview_container" />
|
||||
|
||||
<!-- using AppCompatButton because we don't want the inflater to turn it into a MaterialButton -->
|
||||
<androidx.appcompat.widget.AppCompatButton
|
||||
<Button
|
||||
android:id="@+id/status_poll_button"
|
||||
style="@style/TuskyButton.Outlined"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="4dp"
|
||||
android:background="?attr/content_warning_button"
|
||||
android:gravity="center"
|
||||
android:minWidth="150dp"
|
||||
android:minHeight="0dp"
|
||||
|
|
|
@ -17,6 +17,7 @@
|
|||
android:paddingTop="2dp"
|
||||
android:paddingEnd="6dp"
|
||||
android:paddingBottom="2dp"
|
||||
android:textAlignment="viewStart"
|
||||
android:textColor="?android:attr/textColorPrimary"
|
||||
android:textSize="?attr/status_text_medium"
|
||||
tools:text="40%" />
|
||||
|
|
|
@ -28,13 +28,13 @@
|
|||
tools:text="content warning which is very long and it doesn't fit"
|
||||
tools:visibility="visible" />
|
||||
|
||||
<ToggleButton
|
||||
<Button
|
||||
android:id="@+id/statusContentWarningButton"
|
||||
style="@style/TuskyButton.Outlined"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="4dp"
|
||||
android:layout_marginBottom="4dp"
|
||||
android:background="?attr/content_warning_button"
|
||||
android:minWidth="150dp"
|
||||
android:minHeight="0dp"
|
||||
android:paddingLeft="16dp"
|
||||
|
@ -42,12 +42,11 @@
|
|||
android:paddingRight="16dp"
|
||||
android:paddingBottom="4dp"
|
||||
android:textAllCaps="true"
|
||||
android:textOff="@string/status_content_warning_show_more"
|
||||
android:textOn="@string/status_content_warning_show_less"
|
||||
android:textSize="?attr/status_text_medium"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintStart_toStartOf="@id/guideBegin"
|
||||
app:layout_constraintTop_toBottomOf="@id/statusContentWarningDescription"
|
||||
tools:text="@string/status_content_warning_show_more"
|
||||
tools:visibility="visible" />
|
||||
|
||||
<androidx.emoji.widget.EmojiTextView
|
||||
|
@ -62,13 +61,13 @@
|
|||
app:layout_constraintStart_toStartOf="@id/guideBegin"
|
||||
app:layout_constraintTop_toBottomOf="@id/statusContentWarningButton" />
|
||||
|
||||
<ToggleButton
|
||||
<Button
|
||||
android:id="@+id/buttonToggleContent"
|
||||
style="@style/TuskyButton.Outlined"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="4dp"
|
||||
android:layout_marginBottom="4dp"
|
||||
android:background="?attr/content_warning_button"
|
||||
android:minWidth="150dp"
|
||||
android:minHeight="0dp"
|
||||
android:paddingLeft="16dp"
|
||||
|
@ -76,12 +75,11 @@
|
|||
android:paddingRight="16dp"
|
||||
android:paddingBottom="4dp"
|
||||
android:textAllCaps="true"
|
||||
android:textOff="@string/status_content_show_less"
|
||||
android:textOn="@string/status_content_show_more"
|
||||
android:textSize="?attr/status_text_medium"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintStart_toStartOf="@id/guideBegin"
|
||||
app:layout_constraintTop_toBottomOf="@id/statusContent"
|
||||
tools:text="@string/status_content_show_less"
|
||||
tools:visibility="visible" />
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
|
|
|
@ -118,13 +118,13 @@
|
|||
tools:text="content warning which is very long and it doesn't fit"
|
||||
tools:visibility="visible" />
|
||||
|
||||
<ToggleButton
|
||||
<Button
|
||||
android:id="@+id/status_content_warning_button"
|
||||
style="@style/TuskyButton.Outlined"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="4dp"
|
||||
android:layout_marginBottom="4dp"
|
||||
android:background="?attr/content_warning_button"
|
||||
android:importantForAccessibility="no"
|
||||
android:minWidth="150dp"
|
||||
android:minHeight="0dp"
|
||||
|
@ -139,6 +139,7 @@
|
|||
android:visibility="gone"
|
||||
app:layout_constraintStart_toStartOf="@id/status_display_name"
|
||||
app:layout_constraintTop_toBottomOf="@id/status_content_warning_description"
|
||||
tools:text="@string/status_content_warning_show_more"
|
||||
tools:visibility="visible" />
|
||||
|
||||
<androidx.emoji.widget.EmojiTextView
|
||||
|
@ -157,13 +158,13 @@
|
|||
app:layout_constraintTop_toBottomOf="@id/status_content_warning_button"
|
||||
tools:text="This is a status" />
|
||||
|
||||
<ToggleButton
|
||||
<Button
|
||||
android:id="@+id/button_toggle_content"
|
||||
style="@style/TuskyButton.Outlined"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="4dp"
|
||||
android:layout_marginBottom="4dp"
|
||||
android:background="?attr/content_warning_button"
|
||||
android:importantForAccessibility="no"
|
||||
android:minWidth="150dp"
|
||||
android:minHeight="0dp"
|
||||
|
@ -172,12 +173,11 @@
|
|||
android:paddingRight="16dp"
|
||||
android:paddingBottom="4dp"
|
||||
android:textAllCaps="true"
|
||||
android:textOff="@string/status_content_show_less"
|
||||
android:textOn="@string/status_content_show_more"
|
||||
android:textSize="?attr/status_text_medium"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintStart_toStartOf="@id/status_display_name"
|
||||
app:layout_constraintTop_toBottomOf="@id/status_content"
|
||||
tools:text="@string/status_content_show_less"
|
||||
tools:visibility="visible" />
|
||||
|
||||
<include
|
||||
|
@ -399,13 +399,12 @@
|
|||
app:layout_constraintStart_toStartOf="@id/status_display_name"
|
||||
app:layout_constraintTop_toBottomOf="@id/status_media_preview_container" />
|
||||
|
||||
<!-- using AppCompatButton because we don't want the inflater to turn it into a MaterialButton -->
|
||||
<androidx.appcompat.widget.AppCompatButton
|
||||
<Button
|
||||
android:id="@+id/status_poll_button"
|
||||
style="@style/TuskyButton.Outlined"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="4dp"
|
||||
android:background="?attr/content_warning_button"
|
||||
android:gravity="center"
|
||||
android:minWidth="150dp"
|
||||
android:minHeight="0dp"
|
||||
|
|
|
@ -93,13 +93,13 @@
|
|||
app:layout_constraintTop_toBottomOf="@id/status_avatar"
|
||||
tools:text="CW this is a long long long long long long long long content warning" />
|
||||
|
||||
<ToggleButton
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:id="@+id/status_content_warning_button"
|
||||
style="@style/TuskyButton.Outlined"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="4dp"
|
||||
android:layout_marginBottom="4dp"
|
||||
android:background="?attr/content_warning_button"
|
||||
android:importantForAccessibility="no"
|
||||
android:minWidth="160dp"
|
||||
android:minHeight="0dp"
|
||||
|
@ -108,11 +108,10 @@
|
|||
android:paddingRight="16dp"
|
||||
android:paddingBottom="4dp"
|
||||
android:textAllCaps="true"
|
||||
android:textOff="@string/status_content_warning_show_more"
|
||||
android:textOn="@string/status_content_warning_show_less"
|
||||
android:textSize="?attr/status_text_large"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/status_content_warning_description" />
|
||||
app:layout_constraintTop_toBottomOf="@+id/status_content_warning_description"
|
||||
tools:text="@string/status_content_warning_show_more" />
|
||||
|
||||
<androidx.emoji.widget.EmojiTextView
|
||||
android:id="@+id/status_content"
|
||||
|
@ -399,7 +398,6 @@
|
|||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/status_media_label_2" />
|
||||
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
|
@ -413,13 +411,12 @@
|
|||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/status_media_preview_container" />
|
||||
|
||||
<!-- using AppCompatButton because we don't want the inflater to turn it into a MaterialButton -->
|
||||
<androidx.appcompat.widget.AppCompatButton
|
||||
<Button
|
||||
android:id="@+id/status_poll_button"
|
||||
style="@style/TuskyButton.Outlined"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="4dp"
|
||||
android:background="?attr/content_warning_button"
|
||||
android:gravity="center"
|
||||
android:minWidth="150dp"
|
||||
android:minHeight="0dp"
|
||||
|
|
|
@ -83,7 +83,7 @@
|
|||
android:textSize="?attr/status_text_medium"
|
||||
tools:text="Example CW text" />
|
||||
|
||||
<ToggleButton
|
||||
<Button
|
||||
android:id="@+id/notification_content_warning_button"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
|
@ -91,7 +91,6 @@
|
|||
android:layout_marginTop="4dp"
|
||||
android:layout_marginBottom="4dp"
|
||||
android:layout_toEndOf="@id/notification_status_avatar"
|
||||
android:background="?attr/content_warning_button"
|
||||
android:minWidth="150dp"
|
||||
android:minHeight="0dp"
|
||||
android:paddingLeft="16dp"
|
||||
|
@ -99,8 +98,8 @@
|
|||
android:paddingRight="16dp"
|
||||
android:paddingBottom="4dp"
|
||||
android:textAllCaps="true"
|
||||
android:textOff="@string/status_content_warning_show_more"
|
||||
android:textOn="@string/status_content_warning_show_less"
|
||||
tools:text="@string/status_content_warning_show_more"
|
||||
style="@style/TuskyButton.Outlined"
|
||||
android:textSize="?attr/status_text_medium" />
|
||||
|
||||
<androidx.emoji.widget.EmojiTextView
|
||||
|
@ -116,8 +115,7 @@
|
|||
android:textSize="?attr/status_text_medium"
|
||||
tools:text="Example status here" />
|
||||
|
||||
|
||||
<ToggleButton
|
||||
<Button
|
||||
android:id="@+id/button_toggle_notification_content"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
|
@ -125,7 +123,6 @@
|
|||
android:layout_marginTop="4dp"
|
||||
android:layout_marginBottom="4dp"
|
||||
android:layout_toEndOf="@id/notification_status_avatar"
|
||||
android:background="?attr/content_warning_button"
|
||||
android:minWidth="150dp"
|
||||
android:minHeight="0dp"
|
||||
android:paddingLeft="16dp"
|
||||
|
@ -133,8 +130,8 @@
|
|||
android:paddingRight="16dp"
|
||||
android:paddingBottom="4dp"
|
||||
android:textAllCaps="true"
|
||||
android:textOff="@string/status_content_show_less"
|
||||
android:textOn="@string/status_content_show_more"
|
||||
tools:text="@string/status_content_show_less"
|
||||
style="@style/TuskyButton.Outlined"
|
||||
android:textSize="?attr/status_text_medium"
|
||||
android:visibility="gone" />
|
||||
|
||||
|
|
|
@ -71,11 +71,11 @@
|
|||
tools:text="CW"
|
||||
tools:visibility="visible" />
|
||||
|
||||
<ToggleButton
|
||||
<Button
|
||||
android:id="@+id/status_quote_inline_content_warning_button"
|
||||
style="@style/TuskyButton.Outlined"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="?attr/content_warning_button"
|
||||
android:importantForAccessibility="no"
|
||||
android:minWidth="150dp"
|
||||
android:minHeight="0dp"
|
||||
|
@ -84,12 +84,11 @@
|
|||
android:paddingRight="16dp"
|
||||
android:paddingBottom="4dp"
|
||||
android:textAllCaps="true"
|
||||
android:textOff="@string/status_content_warning_show_more"
|
||||
android:textOn="@string/status_content_warning_show_less"
|
||||
android:textSize="?attr/status_text_medium"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintStart_toEndOf="@id/status_quote_inline_content_warning_description"
|
||||
app:layout_constraintTop_toTopOf="@id/status_quote_inline_content_warning_description"
|
||||
tools:text="@string/status_content_warning_show_more"
|
||||
tools:visibility="visible" />
|
||||
|
||||
<androidx.emoji.widget.EmojiTextView
|
||||
|
|
|
@ -38,7 +38,6 @@
|
|||
<item name="status_favourite_inactive_drawable">@drawable/favourite_inactive_dark</item>
|
||||
<item name="status_quote_drawable">@drawable/ic_quote_24dp</item>
|
||||
<item name="status_quote_disabled_drawable">@drawable/ic_quote_disabled_24dp</item>
|
||||
<item name="content_warning_button">@drawable/toggle_small</item>
|
||||
<item name="sensitive_media_warning_background_color">#80000000</item>
|
||||
<item name="media_preview_unloaded_drawable">@drawable/media_preview_unloaded_dark</item>
|
||||
<item name="android:listDivider">@drawable/status_divider_dark</item>
|
||||
|
|
|
@ -23,7 +23,6 @@
|
|||
<attr name="status_favourite_inactive_drawable" format="reference" />
|
||||
<attr name="status_quote_drawable" format="reference" />
|
||||
<attr name="status_quote_disabled_drawable" format="reference" />
|
||||
<attr name="content_warning_button" format="reference" />
|
||||
<attr name="sensitive_media_warning_background_color" format="reference|color" />
|
||||
<attr name="media_preview_unloaded_drawable" format="reference" />
|
||||
<attr name="conversation_thread_line_drawable" format="reference" />
|
||||
|
|
|
@ -332,8 +332,6 @@
|
|||
|
||||
<string name="state_follow_requested">Follow requested</string>
|
||||
|
||||
<string name="no_content">no content</string>
|
||||
|
||||
<!--These are for timestamps on statuses. For example: "16s" or "2d"-->
|
||||
<string name="abbreviated_in_years">in %dy</string>
|
||||
<string name="abbreviated_in_days">in %dd</string>
|
||||
|
@ -574,6 +572,7 @@
|
|||
<string name="edit_poll">Edit</string>
|
||||
<string name="post_lookup_error_format">Error looking up post %s</string>
|
||||
|
||||
<string name="no_saved_status">You don\'t have any drafts.</string>
|
||||
<string name="no_scheduled_status">You don\'t have any scheduled statuses.</string>
|
||||
|
||||
</resources>
|
||||
|
|
|
@ -90,7 +90,6 @@
|
|||
<item name="status_favourite_inactive_drawable">@drawable/favourite_inactive_light</item>
|
||||
<item name="status_quote_drawable">@drawable/ic_quote_24dp</item>
|
||||
<item name="status_quote_disabled_drawable">@drawable/ic_quote_disabled_24dp</item>
|
||||
<item name="content_warning_button">@drawable/toggle_small_light</item>
|
||||
<item name="sensitive_media_warning_background_color">#80B0B0B0</item>
|
||||
<item name="media_preview_unloaded_drawable">@drawable/media_preview_unloaded_light</item>
|
||||
<item name="android:listDivider">@drawable/status_divider_light</item>
|
||||
|
|
|
@ -86,6 +86,14 @@ class FilterTest {
|
|||
expiresAt = null,
|
||||
irreversible = false,
|
||||
wholeWord = true
|
||||
),
|
||||
Filter(
|
||||
id = "123",
|
||||
phrase = "@twitter.com",
|
||||
context = listOf(Filter.HOME),
|
||||
expiresAt = null,
|
||||
irreversible = false,
|
||||
wholeWord = true
|
||||
)
|
||||
)
|
||||
)
|
||||
|
@ -145,7 +153,7 @@ class FilterTest {
|
|||
}
|
||||
|
||||
@Test
|
||||
fun shouldNotFilter_whenContentDoesNotMAtchWholeWord() {
|
||||
fun shouldNotFilter_whenContentDoesNotMatchWholeWord() {
|
||||
assertFalse(fragment.shouldFilterStatus(
|
||||
mockStatus(content = "one two badWholeWordTest three")
|
||||
))
|
||||
|
@ -172,6 +180,13 @@ class FilterTest {
|
|||
))
|
||||
}
|
||||
|
||||
@Test
|
||||
fun shouldFilterPartialWord_whenWholeWordFilterContainsNonAlphanumericCharacters() {
|
||||
assertTrue(fragment.shouldFilterStatus(
|
||||
mockStatus(content = "one two someone@twitter.com three")
|
||||
))
|
||||
}
|
||||
|
||||
private fun mockStatus(
|
||||
content: String = "",
|
||||
spoilerText: String = "",
|
||||
|
|
Loading…
Reference in New Issue