Add save-as-you-compose drafts.

This commit is contained in:
Cody Henthorne
2022-08-05 17:00:11 -04:00
parent 192509f762
commit 0a76eb81e6
10 changed files with 356 additions and 335 deletions

View File

@@ -3,6 +3,8 @@ package org.thoughtcrime.securesms.contactshare;
import android.text.Editable;
import android.text.TextWatcher;
import androidx.annotation.NonNull;
public abstract class SimpleTextWatcher implements TextWatcher {
@Override
@@ -10,11 +12,15 @@ public abstract class SimpleTextWatcher implements TextWatcher {
@Override
public void onTextChanged(CharSequence s, int start, int before, int count) {
onTextChanged(s.toString());
onTextChanged(s);
}
@Override
public void afterTextChanged(Editable s) { }
public abstract void onTextChanged(String text);
public void onTextChanged(@NonNull CharSequence text) {
onTextChanged(text.toString());
}
public void onTextChanged(@NonNull String text) { }
}