comment #43 - CW cannot be opened in thread view
This commit is contained in:
parent
c399c83591
commit
1b3a844ddd
|
@ -689,13 +689,9 @@ public class StatusAdapter extends RecyclerView.Adapter<RecyclerView.ViewHolder>
|
|||
statusToDeal.isExpended = true;
|
||||
statusToDeal.isMediaDisplayed = true;
|
||||
} else {
|
||||
if (context instanceof ContextActivity && statusToDeal.sensitive) {
|
||||
statusToDeal.isExpended = displayCW;
|
||||
status.isMediaDisplayed = displayCW;
|
||||
}
|
||||
holder.binding.spoilerExpand.setOnClickListener(v -> {
|
||||
statusToDeal.isExpended = !status.isExpended;
|
||||
statusToDeal.isMediaDisplayed = !status.isMediaDisplayed;
|
||||
statusToDeal.isExpended = !statusToDeal.isExpended;
|
||||
statusToDeal.isMediaDisplayed = !statusToDeal.isMediaDisplayed;
|
||||
adapter.notifyItemChanged(getPositionAsync(notificationList, statusList, statusToDeal));
|
||||
});
|
||||
holder.binding.spoilerExpand.setVisibility(View.VISIBLE);
|
||||
|
@ -742,7 +738,6 @@ public class StatusAdapter extends RecyclerView.Adapter<RecyclerView.ViewHolder>
|
|||
} else {
|
||||
holder.binding.containerTrans.setVisibility(View.GONE);
|
||||
}
|
||||
|
||||
if (status.spoiler_text == null || status.spoiler_text.trim().isEmpty() || statusToDeal.isExpended) {
|
||||
if (statusToDeal.content.trim().length() == 0) {
|
||||
holder.binding.mediaContainer.setVisibility(View.GONE);
|
||||
|
|
|
@ -14,6 +14,7 @@ package app.fedilab.android.ui.fragment.timeline;
|
|||
* You should have received a copy of the GNU General Public License along with Fedilab; if not,
|
||||
* see <http://www.gnu.org/licenses>. */
|
||||
|
||||
import static app.fedilab.android.activities.ContextActivity.displayCW;
|
||||
import static app.fedilab.android.activities.ContextActivity.expand;
|
||||
|
||||
import android.content.BroadcastReceiver;
|
||||
|
@ -192,8 +193,13 @@ public class FragmentMastodonContext extends Fragment {
|
|||
}
|
||||
|
||||
public void refresh() {
|
||||
if (statusAdapter != null && statuses != null) {
|
||||
statusAdapter.notifyItemRangeChanged(0, statuses.size());
|
||||
if (statuses != null) {
|
||||
for (Status status : statuses) {
|
||||
status.isExpended = displayCW;
|
||||
}
|
||||
if (statusAdapter != null) {
|
||||
statusAdapter.notifyItemRangeChanged(0, statuses.size());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue