mirror of
https://github.com/oxen-io/session-android.git
synced 2025-04-03 12:55:39 +00:00
Synchronize read receipt configuration from splash screen
// FREEBIE
This commit is contained in:
parent
e388524a2f
commit
b3f0888a2e
@ -9,6 +9,7 @@ import android.view.View;
|
|||||||
import android.view.ViewGroup;
|
import android.view.ViewGroup;
|
||||||
import android.widget.TextView;
|
import android.widget.TextView;
|
||||||
|
|
||||||
|
import org.thoughtcrime.securesms.jobs.MultiDeviceReadReceiptUpdateJob;
|
||||||
import org.thoughtcrime.securesms.util.TextSecurePreferences;
|
import org.thoughtcrime.securesms.util.TextSecurePreferences;
|
||||||
import org.thoughtcrime.securesms.util.ViewUtil;
|
import org.thoughtcrime.securesms.util.ViewUtil;
|
||||||
|
|
||||||
@ -34,7 +35,12 @@ public class ReadReceiptsIntroFragment extends Fragment {
|
|||||||
SwitchCompat preference = ViewUtil.findById(v, R.id.preference);
|
SwitchCompat preference = ViewUtil.findById(v, R.id.preference);
|
||||||
|
|
||||||
preference.setChecked(TextSecurePreferences.isReadReceiptsEnabled(getContext()));
|
preference.setChecked(TextSecurePreferences.isReadReceiptsEnabled(getContext()));
|
||||||
preference.setOnCheckedChangeListener((buttonView, isChecked) -> TextSecurePreferences.setReadReceiptsEnabled(getContext(), isChecked));
|
preference.setOnCheckedChangeListener((buttonView, isChecked) -> {
|
||||||
|
TextSecurePreferences.setReadReceiptsEnabled(getContext(), isChecked);
|
||||||
|
ApplicationContext.getInstance(getContext())
|
||||||
|
.getJobManager()
|
||||||
|
.add(new MultiDeviceReadReceiptUpdateJob(getContext(), isChecked));
|
||||||
|
});
|
||||||
|
|
||||||
return v;
|
return v;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user