commit
3a84abb4f1
|
@ -27,7 +27,7 @@ def generateGitBuild = { ->
|
|||
String commitObject = stdout.toString().trim()
|
||||
stringBuilder.append(commitObject)
|
||||
} catch (ignored) {
|
||||
return "NoGitSystemAvailable";
|
||||
stringBuilder.append('NoGitSystemAvailable')
|
||||
}
|
||||
stringBuilder.append('-')
|
||||
stringBuilder.append((new Date()).format('yyyy.MM.dd'))
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
package info.nightscout.androidaps;
|
||||
|
||||
import android.content.DialogInterface;
|
||||
import android.content.Intent;
|
||||
import android.content.SharedPreferences;
|
||||
import android.content.pm.PackageManager;
|
||||
|
@ -7,6 +8,7 @@ import android.os.Bundle;
|
|||
import android.preference.PreferenceManager;
|
||||
import android.support.v4.app.Fragment;
|
||||
import android.support.v4.view.ViewPager;
|
||||
import android.support.v7.app.AlertDialog;
|
||||
import android.support.v7.app.AppCompatActivity;
|
||||
import android.support.v7.widget.Toolbar;
|
||||
import android.view.Menu;
|
||||
|
@ -110,7 +112,17 @@ public class MainActivity extends AppCompatActivity {
|
|||
startActivity(i);
|
||||
break;
|
||||
case R.id.nav_resetdb:
|
||||
MainApp.getDbHelper().resetDatabases();
|
||||
new AlertDialog.Builder(this)
|
||||
.setTitle(R.string.nav_resetdb)
|
||||
.setMessage(R.string.reset_db_confirm)
|
||||
.setNegativeButton(android.R.string.cancel, null)
|
||||
.setPositiveButton(android.R.string.ok, new DialogInterface.OnClickListener() {
|
||||
@Override public void onClick(DialogInterface dialog, int which) {
|
||||
MainApp.getDbHelper().resetDatabases();
|
||||
}
|
||||
})
|
||||
.create()
|
||||
.show();
|
||||
break;
|
||||
case R.id.nav_export:
|
||||
ImportExportPrefs.verifyStoragePermissions(this);
|
||||
|
|
|
@ -8,7 +8,8 @@
|
|||
<string name="nav_refreshtreatments">Refresh treatments from NS</string>
|
||||
<string name="nav_backup">Backup</string>
|
||||
<string name="nav_test_alert">Test alarm</string>
|
||||
<string name="nav_resetdb">Reset databases</string>
|
||||
<string name="nav_resetdb">Reset Databases</string>
|
||||
<string name="reset_db_confirm">Do you really want to reset the databases?</string>
|
||||
<string name="nav_exit">Exit</string>
|
||||
<string name="danar_useextended_title">Use extended boluses for >200%</string>
|
||||
<string name="danar_bt_name_title">DanaR Bluetooth device</string>
|
||||
|
|
Loading…
Reference in a new issue