mirror of
https://codeberg.org/Freeyourgadget/Gadgetbridge
synced 2024-08-24 16:21:16 +02:00
Refresh ControlCenterv2 on menu exit
This commit is contained in:
parent
8374a2b8f8
commit
29375be3e2
@ -77,6 +77,9 @@ public class ControlCenterv2 extends AppCompatActivity
|
||||
|
||||
private boolean isLanguageInvalid = false;
|
||||
|
||||
public static final int MENU_REFRESH_CODE=1;
|
||||
|
||||
|
||||
private final BroadcastReceiver mReceiver = new BroadcastReceiver() {
|
||||
@Override
|
||||
public void onReceive(Context context, Intent intent) {
|
||||
@ -242,6 +245,15 @@ public class ControlCenterv2 extends AppCompatActivity
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onActivityResult(int requestCode, int resultCode, Intent data) {
|
||||
super.onActivityResult(requestCode, resultCode, data);
|
||||
if (requestCode == MENU_REFRESH_CODE) {
|
||||
this.recreate();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public boolean onNavigationItemSelected(@NonNull MenuItem item) {
|
||||
|
||||
@ -251,7 +263,7 @@ public class ControlCenterv2 extends AppCompatActivity
|
||||
switch (item.getItemId()) {
|
||||
case R.id.action_settings:
|
||||
Intent settingsIntent = new Intent(this, SettingsActivity.class);
|
||||
startActivity(settingsIntent);
|
||||
startActivityForResult(settingsIntent, MENU_REFRESH_CODE);
|
||||
return true;
|
||||
case R.id.action_debug:
|
||||
Intent debugIntent = new Intent(this, DebugActivity.class);
|
||||
|
Loading…
Reference in New Issue
Block a user