mirror of
https://github.com/oxen-io/session-android.git
synced 2024-12-25 01:07:47 +00:00
34 lines
1.1 KiB
Java
34 lines
1.1 KiB
Java
package org.thoughtcrime.securesms.components.reminder;
|
|
|
|
import android.content.Context;
|
|
import android.os.AsyncTask;
|
|
import androidx.annotation.NonNull;
|
|
import android.view.View;
|
|
import android.view.View.OnClickListener;
|
|
|
|
import network.loki.messenger.R;
|
|
import org.thoughtcrime.securesms.database.DatabaseFactory;
|
|
import org.thoughtcrime.securesms.recipients.Recipient;
|
|
|
|
public class InviteReminder extends Reminder {
|
|
|
|
public InviteReminder(final @NonNull Context context,
|
|
final @NonNull Recipient recipient)
|
|
{
|
|
super(context.getString(R.string.reminder_header_invite_title),
|
|
context.getString(R.string.reminder_header_invite_text, recipient.toShortString()));
|
|
|
|
setDismissListener(new OnClickListener() {
|
|
@Override public void onClick(View v) {
|
|
new AsyncTask<Void,Void,Void>() {
|
|
|
|
@Override protected Void doInBackground(Void... params) {
|
|
DatabaseFactory.getRecipientDatabase(context).setSeenInviteReminder(recipient, true);
|
|
return null;
|
|
}
|
|
}.executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR);
|
|
}
|
|
});
|
|
}
|
|
}
|