mirror of
https://codeberg.org/tom79/Fedilab.git
synced 2025-01-07 00:20:08 +02:00
Fix issue #300 - Crash when removing a message in thread
This commit is contained in:
parent
2180da64b7
commit
331a5433ad
1 changed files with 6 additions and 0 deletions
|
@ -108,6 +108,7 @@ public class ComposeActivity extends BaseActivity implements ComposeAdapter.Mana
|
|||
private Status statusReply, statusMention;
|
||||
private StatusDraft statusDraft;
|
||||
private ComposeAdapter composeAdapter;
|
||||
private static int composeID;
|
||||
|
||||
private final BroadcastReceiver imageReceiver = new BroadcastReceiver() {
|
||||
@Override
|
||||
|
@ -156,6 +157,8 @@ public class ComposeActivity extends BaseActivity implements ComposeAdapter.Mana
|
|||
setContentView(binding.getRoot());
|
||||
setSupportActionBar(binding.toolbar);
|
||||
ActionBar actionBar = getSupportActionBar();
|
||||
//Fake id given to drafts
|
||||
composeID = 1;
|
||||
//Remove title
|
||||
if (actionBar != null) {
|
||||
actionBar.setDisplayShowTitleEnabled(false);
|
||||
|
@ -668,9 +671,12 @@ public class ComposeActivity extends BaseActivity implements ComposeAdapter.Mana
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void onItemDraftAdded(int position) {
|
||||
Status status = new Status();
|
||||
composeID++;
|
||||
status.id = String.valueOf(composeID);
|
||||
status.mentions = statusList.get(position).mentions;
|
||||
status.visibility = statusList.get(position).visibility;
|
||||
status.spoiler_text = statusList.get(position).spoiler_text;
|
||||
|
|
Loading…
Reference in a new issue