From 60383e112a1d819a4c40971af04bc366fa263879 Mon Sep 17 00:00:00 2001 From: Ivan Kupalov Date: Sun, 8 Sep 2019 10:30:59 +0200 Subject: [PATCH] Notify thread adapter when sensitive media is shown (#1472) --- .../tusky/fragment/ViewThreadFragment.java | 23 ++++++++++--------- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/app/src/main/java/com/keylesspalace/tusky/fragment/ViewThreadFragment.java b/app/src/main/java/com/keylesspalace/tusky/fragment/ViewThreadFragment.java index 7239f793..00464311 100644 --- a/app/src/main/java/com/keylesspalace/tusky/fragment/ViewThreadFragment.java +++ b/app/src/main/java/com/keylesspalace/tusky/fragment/ViewThreadFragment.java @@ -26,6 +26,17 @@ import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; +import androidx.arch.core.util.Function; +import androidx.core.util.Pair; +import androidx.lifecycle.Lifecycle; +import androidx.recyclerview.widget.DividerItemDecoration; +import androidx.recyclerview.widget.LinearLayoutManager; +import androidx.recyclerview.widget.RecyclerView; +import androidx.recyclerview.widget.SimpleItemAnimator; +import androidx.swiperefreshlayout.widget.SwipeRefreshLayout; + import com.google.android.material.snackbar.Snackbar; import com.keylesspalace.tusky.AccountListActivity; import com.keylesspalace.tusky.BaseActivity; @@ -60,16 +71,6 @@ import java.util.Locale; import javax.inject.Inject; -import androidx.annotation.NonNull; -import androidx.annotation.Nullable; -import androidx.arch.core.util.Function; -import androidx.core.util.Pair; -import androidx.lifecycle.Lifecycle; -import androidx.recyclerview.widget.DividerItemDecoration; -import androidx.recyclerview.widget.LinearLayoutManager; -import androidx.recyclerview.widget.RecyclerView; -import androidx.recyclerview.widget.SimpleItemAnimator; -import androidx.swiperefreshlayout.widget.SwipeRefreshLayout; import io.reactivex.android.schedulers.AndroidSchedulers; import retrofit2.Call; import retrofit2.Callback; @@ -320,7 +321,7 @@ public final class ViewThreadFragment extends SFragment implements .setIsShowingSensitiveContent(isShowing) .createStatusViewData(); statuses.setPairedItem(position, newViewData); - adapter.setItem(position, newViewData, false); + adapter.setItem(position, newViewData, true); } @Override