mirror of
https://codeberg.org/tom79/Fedilab.git
synced 2024-12-22 16:50:04 +02:00
comment #43 - CW cannot be opened in thread view
This commit is contained in:
parent
c399c83591
commit
1b3a844ddd
2 changed files with 10 additions and 9 deletions
|
@ -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,10 +193,15 @@ public class FragmentMastodonContext extends Fragment {
|
|||
}
|
||||
|
||||
public void refresh() {
|
||||
if (statusAdapter != null && statuses != null) {
|
||||
if (statuses != null) {
|
||||
for (Status status : statuses) {
|
||||
status.isExpended = displayCW;
|
||||
}
|
||||
if (statusAdapter != null) {
|
||||
statusAdapter.notifyItemRangeChanged(0, statuses.size());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void redraw() {
|
||||
if (statusAdapter != null && firstStatus != null) {
|
||||
|
|
Loading…
Reference in a new issue