diff --git a/app/src/main/java/com/keylesspalace/tusky/ComposeActivity.java b/app/src/main/java/com/keylesspalace/tusky/ComposeActivity.java
index e464c068..1e34124e 100644
--- a/app/src/main/java/com/keylesspalace/tusky/ComposeActivity.java
+++ b/app/src/main/java/com/keylesspalace/tusky/ComposeActivity.java
@@ -145,8 +145,8 @@ public class ComposeActivity extends BaseActivity implements ComposeOptionsFragm
ImageButton pickBtn;
@BindView(R.id.compose_photo_take)
ImageButton takeBtn;
- @BindView(R.id.action_toggle_nsfw)
- Button nsfwBtn;
+ @BindView(R.id.action_hide_media)
+ ImageButton hideMediaToggle;
@BindView(R.id.postProgress)
ProgressBar postProgress;
@BindView(R.id.action_toggle_visibility)
@@ -209,10 +209,10 @@ public class ComposeActivity extends BaseActivity implements ComposeOptionsFragm
initiateCameraApp();
}
});
- nsfwBtn.setOnClickListener(new View.OnClickListener() {
+ hideMediaToggle.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
- toggleNsfw();
+ toggleHideMedia();
}
});
visibilityBtn.setOnClickListener(new View.OnClickListener() {
@@ -293,7 +293,7 @@ public class ComposeActivity extends BaseActivity implements ComposeOptionsFragm
// After the starting state is finalised, the interface can be set to reflect this state.
setStatusVisibility(startingVisibility);
postProgress.setVisibility(View.INVISIBLE);
- updateNsfwButtonColor();
+ updateHideMediaToggleColor();
final ParserUtils parser = new ParserUtils(this);
@@ -456,25 +456,25 @@ public class ComposeActivity extends BaseActivity implements ComposeOptionsFragm
Snackbar.make(findViewById(R.id.activity_compose), stringId, Snackbar.LENGTH_LONG).show();
}
- private void toggleNsfw() {
+ private void toggleHideMedia() {
statusMarkSensitive = !statusMarkSensitive;
- updateNsfwButtonColor();
+ updateHideMediaToggleColor();
}
- private void updateNsfwButtonColor() {
+ private void updateHideMediaToggleColor() {
@AttrRes int attribute;
if (statusMarkSensitive) {
- attribute = R.attr.compose_nsfw_button_selected_color;
+ attribute = R.attr.compose_hide_media_button_selected_color;
} else {
- attribute = R.attr.compose_nsfw_button_color;
+ attribute = R.attr.compose_hide_media_button_color;
}
- nsfwBtn.setTextColor(ThemeUtils.getColor(this, attribute));
+ ThemeUtils.setDrawableTint(this, hideMediaToggle.getDrawable(), attribute);
}
private void disableButtons() {
pickBtn.setClickable(false);
takeBtn.setClickable(false);
- nsfwBtn.setClickable(false);
+ hideMediaToggle.setClickable(false);
visibilityBtn.setClickable(false);
floatingBtn.setEnabled(false);
}
@@ -482,7 +482,7 @@ public class ComposeActivity extends BaseActivity implements ComposeOptionsFragm
private void enableButtons() {
pickBtn.setClickable(true);
takeBtn.setClickable(true);
- nsfwBtn.setClickable(true);
+ hideMediaToggle.setClickable(true);
visibilityBtn.setClickable(true);
floatingBtn.setEnabled(true);
}
@@ -1168,13 +1168,14 @@ public class ComposeActivity extends BaseActivity implements ComposeOptionsFragm
if (!showMarkSensitive) {
statusMarkSensitive = false;
- nsfwBtn.setTextColor(ThemeUtils.getColor(this, R.attr.compose_nsfw_button_color));
+ ThemeUtils.setDrawableTint(this, hideMediaToggle.getDrawable(),
+ R.attr.compose_hide_media_button_color);
}
if (show) {
- nsfwBtn.setVisibility(View.VISIBLE);
+ hideMediaToggle.setVisibility(View.VISIBLE);
} else {
- nsfwBtn.setVisibility(View.GONE);
+ hideMediaToggle.setVisibility(View.GONE);
}
}
diff --git a/app/src/main/res/drawable/ic_hide_media_24dp.xml b/app/src/main/res/drawable/ic_hide_media_24dp.xml
new file mode 100644
index 00000000..8b64ae1a
--- /dev/null
+++ b/app/src/main/res/drawable/ic_hide_media_24dp.xml
@@ -0,0 +1,7 @@
+
+
+
diff --git a/app/src/main/res/layout/activity_compose.xml b/app/src/main/res/layout/activity_compose.xml
index 0737da5a..1e837d2c 100644
--- a/app/src/main/res/layout/activity_compose.xml
+++ b/app/src/main/res/layout/activity_compose.xml
@@ -127,17 +127,16 @@
app:srcCompat="@drawable/ic_public_24dp"
android:contentDescription="@string/action_compose_options" />
-
+ app:srcCompat="@drawable/ic_hide_media_24dp"
+ android:contentDescription="@string/action_hide_media"
+ android:visibility="gone" />
-
-
+
+
diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml
index cba9f640..8f88c502 100644
--- a/app/src/main/res/values/strings.xml
+++ b/app/src/main/res/values/strings.xml
@@ -91,7 +91,7 @@
Mute
Unmute
Mention
- NSFW
+ Hide media
Options
Open drawer
Clear
diff --git a/app/src/main/res/values/styles.xml b/app/src/main/res/values/styles.xml
index 853d6291..db9e5071 100644
--- a/app/src/main/res/values/styles.xml
+++ b/app/src/main/res/values/styles.xml
@@ -65,8 +65,8 @@
- @color/compose_media_button_disabled_dark
- @color/color_accent_dark
- @drawable/border_background_dark
- - @color/image_button_dark
- - @color/color_accent_dark
+ - @color/image_button_dark
+ - @color/color_accent_dark
- @color/image_button_dark
- @color/color_background_dark
- @drawable/status_divider_dark
@@ -142,8 +142,8 @@
- @color/compose_media_button_disabled_light
- @color/compose_mention_light
- @drawable/border_background_light
- - @color/image_button_light
- - @color/color_accent_light
+ - @color/image_button_light
+ - @color/color_accent_light
- @color/image_button_light
- @color/report_status_background_light
- @drawable/report_status_divider_light