added disable warning
This commit is contained in:
parent
f717355519
commit
e95d0cb010
@ -22,6 +22,7 @@ import android.widget.SeekBar;
|
||||
import android.widget.Spinner;
|
||||
import android.widget.Switch;
|
||||
import android.widget.TextView;
|
||||
import android.widget.Toast;
|
||||
|
||||
import com.android.billingclient.api.Purchase;
|
||||
import com.blackforestbytes.simplecloudnotifier.R;
|
||||
@ -216,7 +217,7 @@ public class SettingsFragment extends Fragment implements MusicPickerListener
|
||||
{
|
||||
SCNSettings s = SCNSettings.inst();
|
||||
|
||||
prefAppEnabled.setOnCheckedChangeListener((a,b) -> { s.Enabled=b; saveAndUpdate(); });
|
||||
prefAppEnabled.setOnCheckedChangeListener((a,b) -> { boolean prev=s.Enabled; s.Enabled=b; saveAndUpdate(); updateEnabled(prev, b); });
|
||||
prefEnableDeleteSwipe.setOnCheckedChangeListener((a,b) -> { s.EnableDeleteSwipe=b; saveAndUpdate(); });
|
||||
|
||||
prefLocalCacheSize.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener()
|
||||
@ -261,6 +262,18 @@ public class SettingsFragment extends Fragment implements MusicPickerListener
|
||||
prefMsgHighVolumeTest.setOnClickListener((v) -> { if (s.PriorityHigh.ForceVolume) playTestSound(2, prefMsgHighVolumeTest, s.PriorityHigh.SoundSource, s.PriorityHigh.ForceVolumeValue); });
|
||||
}
|
||||
|
||||
private void updateEnabled(boolean prev, boolean now)
|
||||
{
|
||||
if (!prev && now)
|
||||
{
|
||||
SCNApp.showToast("SimpleCloudNotifier is now enabled", Toast.LENGTH_SHORT);
|
||||
}
|
||||
else if (prev && !now)
|
||||
{
|
||||
SCNApp.showToast("SimpleCloudNotifier is now disabled\nYou won't recieve new messages.", Toast.LENGTH_LONG);
|
||||
}
|
||||
}
|
||||
|
||||
private void updateVolume(int idx, int volume)
|
||||
{
|
||||
if (mPlayers[idx] != null && mPlayers[idx].isPlaying())
|
||||
|
Loading…
Reference in New Issue
Block a user