mirror of
https://github.com/oxen-io/session-android.git
synced 2024-11-29 04:55:15 +00:00
42 lines
1.3 KiB
Java
42 lines
1.3 KiB
Java
|
package org.thoughtcrime.securesms;
|
||
|
|
||
|
|
||
|
import android.os.Bundle;
|
||
|
import android.support.v4.app.Fragment;
|
||
|
import android.support.v7.widget.SwitchCompat;
|
||
|
import android.view.LayoutInflater;
|
||
|
import android.view.View;
|
||
|
import android.view.ViewGroup;
|
||
|
import android.widget.TextView;
|
||
|
|
||
|
import org.thoughtcrime.securesms.util.TextSecurePreferences;
|
||
|
import org.thoughtcrime.securesms.util.ViewUtil;
|
||
|
|
||
|
public class ReadReceiptsIntroFragment extends Fragment {
|
||
|
|
||
|
public static ReadReceiptsIntroFragment newInstance() {
|
||
|
ReadReceiptsIntroFragment fragment = new ReadReceiptsIntroFragment();
|
||
|
Bundle args = new Bundle();
|
||
|
fragment.setArguments(args);
|
||
|
return fragment;
|
||
|
}
|
||
|
|
||
|
public ReadReceiptsIntroFragment() {}
|
||
|
|
||
|
@Override
|
||
|
public void onCreate(Bundle savedInstanceState) {
|
||
|
super.onCreate(savedInstanceState);
|
||
|
}
|
||
|
|
||
|
@Override
|
||
|
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
|
||
|
View v = inflater.inflate(R.layout.experience_upgrade_preference_fragment, container, false);
|
||
|
SwitchCompat preference = ViewUtil.findById(v, R.id.preference);
|
||
|
|
||
|
preference.setChecked(TextSecurePreferences.isReadReceiptsEnabled(getContext()));
|
||
|
preference.setOnCheckedChangeListener((buttonView, isChecked) -> TextSecurePreferences.setReadReceiptsEnabled(getContext(), isChecked));
|
||
|
|
||
|
return v;
|
||
|
}
|
||
|
}
|