@@ -280,11+286,17 @@ public class DomainsActivity extends AppCompatActivity implements AddDomainDialo
// Go home.
NavUtils.navigateUpFromSameTask(this);
}
// Go home.
NavUtils.navigateUpFromSameTask(this);
}
- } else if (findViewById(R.id.domain_settings_scrollview) != null) { // The device is in single-paned mode and `DomainSettingsFragment` is displayed.
+ } else if (closeOnBack) { // Go directly back to the main WebView activity because the domains activity was launched from the options menu.
// Save the current domain settings.
saveDomainSettings();
// Save the current domain settings.
saveDomainSettings();
- // Display `DomainsListFragment`.
+ // Go home.
+ NavUtils.navigateUpFromSameTask(this);
+ } else if (findViewById(R.id.domain_settings_scrollview) != null) { // The device is in single-paned mode and the domain settings fragment is displayed.
+ // Save the current domain settings.
+ saveDomainSettings();
+
+ // Display the domains list fragment.
DomainsListFragment domainsListFragment = new DomainsListFragment();
+ // Put extra information instructing the domains activity to directly load the current domain and close on back instread of returning to the domains list.
+ // Put extra information instructing the domains activity to directly load the new domain and close on back instead of returning to the domains list.