mirror of
https://github.com/nuclearfog/Shitter.git
synced 2025-01-31 11:25:03 +01:00
added settings option to enable status blur
This commit is contained in:
parent
c11ef57f80
commit
57e1d78b97
@ -142,6 +142,7 @@ public class SettingsActivity extends AppCompatActivity implements OnClickListen
|
||||
SwitchButton enableLike = findViewById(R.id.enable_like);
|
||||
SwitchButton enableNitter = findViewById(R.id.settings_enable_twitter_alt);
|
||||
SwitchButton enableLocalTl = findViewById(R.id.settings_local_timeline);
|
||||
SwitchButton hideSensitive = findViewById(R.id.enable_status_hide_sensitive);
|
||||
View EnableTwitterAltDescr = findViewById(R.id.settings_enable_twitter_alt_descr);
|
||||
SwitchButton enableStatusIcons = findViewById(R.id.enable_status_indicators);
|
||||
SeekBar listSizeSelector = findViewById(R.id.settings_list_seek);
|
||||
@ -226,6 +227,7 @@ public class SettingsActivity extends AppCompatActivity implements OnClickListen
|
||||
enableLike.setCheckedImmediately(settings.likeEnabled());
|
||||
enableNitter.setCheckedImmediately(settings.twitterAltSet());
|
||||
enableLocalTl.setCheckedImmediately(settings.useLocalTimeline());
|
||||
hideSensitive.setCheckedImmediately(settings.hideSensitiveEnabled());
|
||||
enableStatusIcons.setCheckedImmediately(settings.statusIndicatorsEnabled());
|
||||
enableProxy.setCheckedImmediately(settings.isProxyEnabled());
|
||||
enableAuth.setCheckedImmediately(settings.isProxyAuthSet());
|
||||
@ -246,6 +248,7 @@ public class SettingsActivity extends AppCompatActivity implements OnClickListen
|
||||
enableNitter.setOnCheckedChangeListener(this);
|
||||
enableLocalTl.setOnCheckedChangeListener(this);
|
||||
enableStatusIcons.setOnCheckedChangeListener(this);
|
||||
hideSensitive.setOnCheckedChangeListener(this);
|
||||
enableProxy.setOnCheckedChangeListener(this);
|
||||
enableAuth.setOnCheckedChangeListener(this);
|
||||
toolbarOverlap.setOnCheckedChangeListener(this);
|
||||
@ -533,7 +536,7 @@ public class SettingsActivity extends AppCompatActivity implements OnClickListen
|
||||
enableAuth.setChecked(false);
|
||||
}
|
||||
}
|
||||
//enable proxy authentication
|
||||
// enable proxy authentication
|
||||
else if (c.getId() == R.id.settings_enable_auth) {
|
||||
if (checked) {
|
||||
proxyUser.setVisibility(View.VISIBLE);
|
||||
@ -543,6 +546,10 @@ public class SettingsActivity extends AppCompatActivity implements OnClickListen
|
||||
proxyPass.setVisibility(View.GONE);
|
||||
}
|
||||
}
|
||||
// hide sensitive content
|
||||
else if (c.getId() == R.id.enable_status_hide_sensitive) {
|
||||
settings.hideSensitive(checked);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
@ -172,7 +172,7 @@ public class PreviewAdapter extends RecyclerView.Adapter<ViewHolder> implements
|
||||
items.addAll(Arrays.asList(status.getMedia()));
|
||||
if (status.getCards().length > 0)
|
||||
items.addAll(Arrays.asList(status.getCards()));
|
||||
blurMedia = status.isSensitive();
|
||||
blurMedia = settings.hideSensitiveEnabled() & status.isSensitive();
|
||||
notifyDataSetChanged();
|
||||
}
|
||||
|
||||
|
@ -279,7 +279,7 @@
|
||||
android:layout_marginEnd="@dimen/settings_switch_margin"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/enable_like"
|
||||
app:layout_constraintBottom_toTopOf="@id/spinner_font"
|
||||
app:layout_constraintBottom_toTopOf="@id/enable_status_hide_sensitive"
|
||||
app:layout_constraintEnd_toStartOf="@id/status_indicators_descr" />
|
||||
|
||||
<TextView
|
||||
@ -294,6 +294,29 @@
|
||||
app:layout_constraintBottom_toBottomOf="@id/enable_status_indicators"
|
||||
app:layout_constraintEnd_toEndOf="parent" />
|
||||
|
||||
<com.kyleduo.switchbutton.SwitchButton
|
||||
android:id="@+id/enable_status_hide_sensitive"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="@dimen/settings_column_margin"
|
||||
android:layout_marginEnd="@dimen/settings_switch_margin"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/enable_status_indicators"
|
||||
app:layout_constraintBottom_toTopOf="@id/spinner_font"
|
||||
app:layout_constraintEnd_toStartOf="@id/enable_status_hide_sensitive_descr" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/enable_status_hide_sensitive_descr"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:lines="1"
|
||||
android:text="@string/settings_hide_sensitive"
|
||||
android:textSize="@dimen/settings_textsize_small"
|
||||
app:layout_constraintStart_toEndOf="@id/enable_status_hide_sensitive"
|
||||
app:layout_constraintTop_toTopOf="@id/enable_status_hide_sensitive"
|
||||
app:layout_constraintBottom_toBottomOf="@id/enable_status_hide_sensitive"
|
||||
app:layout_constraintEnd_toEndOf="parent" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/settings_fonttype_icon"
|
||||
android:layout_width="@dimen/settings_icon_size"
|
||||
@ -311,8 +334,8 @@
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:popupBackground="@android:color/transparent"
|
||||
app:layout_constraintStart_toStartOf="@+id/status_indicators_descr"
|
||||
app:layout_constraintTop_toBottomOf="@id/enable_status_indicators"
|
||||
app:layout_constraintStart_toStartOf="@+id/enable_status_hide_sensitive_descr"
|
||||
app:layout_constraintTop_toBottomOf="@id/enable_status_hide_sensitive"
|
||||
app:layout_constraintEnd_toStartOf="@id/spinner_scale"
|
||||
app:layout_constraintHorizontal_weight="3" />
|
||||
|
||||
|
@ -293,4 +293,5 @@
|
||||
<string name="dialog_status_spoiler">Inhalt als Spoiler markieren</string>
|
||||
<string name="dialog_status_visibility">Sichtbarkeit</string>
|
||||
<string name="status_contains_spoiler">Spoiler!</string>
|
||||
<string name="settings_hide_sensitive">verstecke sensible Inhalte</string>
|
||||
</resources>
|
@ -186,6 +186,7 @@
|
||||
<string name="settings_color_like">Like</string>
|
||||
<string name="settings_color_fav">Favorite</string>
|
||||
<string name="settings_enable_indicators">show additional status information</string>
|
||||
<string name="settings_hide_sensitive">hide sensitive/spoiler content</string>
|
||||
<string name="highlight">Highlight</string>
|
||||
<string name="settings_list_size">List size</string>
|
||||
<string name="settings_enable_like">use \'Like\' instead of ’Favorite’</string>
|
||||
|
Loading…
x
Reference in New Issue
Block a user