Write an empty mp3 when disabling sound - 1.188 🚀
Also revert to the default sound if you enable it again. Closes #178
This commit is contained in:
parent
0592a9d695
commit
f6a75d89cd
|
@ -308,6 +308,17 @@ export default function SettingsPage() {
|
||||||
value={settings.noSound}
|
value={settings.noSound}
|
||||||
onChange={async (value) => {
|
onChange={async (value) => {
|
||||||
setValue("noSound", value);
|
setValue("noSound", value);
|
||||||
|
const silentPath = Dirs.DocumentDir + "/silent.mp3";
|
||||||
|
|
||||||
|
if (value) {
|
||||||
|
await FileSystem.writeFile(silentPath, "");
|
||||||
|
setValue("sound", silentPath);
|
||||||
|
await update("sound", silentPath);
|
||||||
|
} else if (!value && settings.sound === silentPath) {
|
||||||
|
setValue("sound", null);
|
||||||
|
await update("sound", null);
|
||||||
|
}
|
||||||
|
|
||||||
await update("noSound", value);
|
await update("noSound", value);
|
||||||
if (value) toast("Alarms will no longer make a sound.");
|
if (value) toast("Alarms will no longer make a sound.");
|
||||||
else toast("Enabled sound for alarms.");
|
else toast("Enabled sound for alarms.");
|
||||||
|
|
|
@ -85,8 +85,8 @@ android {
|
||||||
applicationId "com.massive"
|
applicationId "com.massive"
|
||||||
minSdkVersion rootProject.ext.minSdkVersion
|
minSdkVersion rootProject.ext.minSdkVersion
|
||||||
targetSdkVersion rootProject.ext.targetSdkVersion
|
targetSdkVersion rootProject.ext.targetSdkVersion
|
||||||
versionCode 36213
|
versionCode 36214
|
||||||
versionName "1.187"
|
versionName "1.188"
|
||||||
}
|
}
|
||||||
signingConfigs {
|
signingConfigs {
|
||||||
release {
|
release {
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "massive",
|
"name": "massive",
|
||||||
"version": "1.187",
|
"version": "1.188",
|
||||||
"private": true,
|
"private": true,
|
||||||
"license": "GPL-3.0-only",
|
"license": "GPL-3.0-only",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
|
Loading…
Reference in New Issue