forked from mirrors/Fedilab
Fix automatically hide after x seconds
This commit is contained in:
parent
a1d1058ff3
commit
9d4a576bc1
1 changed files with 4 additions and 2 deletions
|
@ -1240,8 +1240,10 @@ public class StatusAdapter extends RecyclerView.Adapter<RecyclerView.ViewHolder>
|
||||||
layoutMediaBinding.media.setOnClickListener(v -> {
|
layoutMediaBinding.media.setOnClickListener(v -> {
|
||||||
if (statusToDeal.isMediaObfuscated && mediaObfuscated(statusToDeal) && !expand_media) {
|
if (statusToDeal.isMediaObfuscated && mediaObfuscated(statusToDeal) && !expand_media) {
|
||||||
statusToDeal.isMediaObfuscated = false;
|
statusToDeal.isMediaObfuscated = false;
|
||||||
adapter.notifyItemChanged(holder.getBindingAdapterPosition());
|
int position = holder.getBindingAdapterPosition();
|
||||||
|
adapter.notifyItemChanged(position);
|
||||||
final int timeout = sharedpreferences.getInt(context.getString(R.string.SET_NSFW_TIMEOUT), 5);
|
final int timeout = sharedpreferences.getInt(context.getString(R.string.SET_NSFW_TIMEOUT), 5);
|
||||||
|
|
||||||
if (timeout > 0) {
|
if (timeout > 0) {
|
||||||
new CountDownTimer((timeout * 1000L), 1000) {
|
new CountDownTimer((timeout * 1000L), 1000) {
|
||||||
public void onTick(long millisUntilFinished) {
|
public void onTick(long millisUntilFinished) {
|
||||||
|
@ -1249,7 +1251,7 @@ public class StatusAdapter extends RecyclerView.Adapter<RecyclerView.ViewHolder>
|
||||||
|
|
||||||
public void onFinish() {
|
public void onFinish() {
|
||||||
status.isMediaObfuscated = true;
|
status.isMediaObfuscated = true;
|
||||||
adapter.notifyItemChanged(holder.getBindingAdapterPosition());
|
adapter.notifyItemChanged(position);
|
||||||
}
|
}
|
||||||
}.start();
|
}.start();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue