Added undo sent snackbar

This commit is contained in:
M66B
2024-09-27 11:22:27 +02:00
parent 2192aff1b8
commit eab4033818
3 changed files with 111 additions and 5 deletions

View File

@@ -128,6 +128,7 @@ import androidx.fragment.app.FragmentManager;
import androidx.fragment.app.FragmentTransaction;
import androidx.lifecycle.Lifecycle;
import androidx.lifecycle.Observer;
import androidx.localbroadcastmanager.content.LocalBroadcastManager;
import androidx.preference.PreferenceManager;
import androidx.recyclerview.widget.LinearLayoutManager;
import androidx.recyclerview.widget.RecyclerView;
@@ -7541,6 +7542,15 @@ public class FragmentCompose extends FragmentBase {
if (tbd != null)
EntityOperation.queue(context, tbd, EntityOperation.DELETE);
if (draft.ui_snoozed != null) {
LocalBroadcastManager lbm = LocalBroadcastManager.getInstance(context);
Intent sent = new Intent(ActivityView.ACTION_SENT_MESSAGE);
sent.putExtra("id", draft.id);
sent.putExtra("at", draft.ui_snoozed);
sent.putExtra("to", MessageHelper.formatAddressesShort(draft.to));
lbm.sendBroadcast(sent);
}
final String feedback;
if (draft.ui_snoozed == null) {
boolean suitable = ConnectionHelper.getNetworkState(context).isSuitable();