summaryrefslogtreecommitdiffhomepage
path: root/app/src/main/java
diff options
context:
space:
mode:
authorSamuel Holland <samuel@sholland.org>2017-08-15 17:07:17 -0500
committerSamuel Holland <samuel@sholland.org>2017-08-15 17:07:17 -0500
commit2103a28f8f1c72d2829e935089fdda3950abd346 (patch)
tree1ac775ef438200a8ad8c4a3c37e58a96b3bde5e7 /app/src/main/java
parentcfcda8bd132b9dae5cf9e0efcb06f7dd5b5850ad (diff)
ConfigActivity: Show the current config in the title
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Diffstat (limited to 'app/src/main/java')
-rw-r--r--app/src/main/java/com/wireguard/android/ConfigActivity.java4
1 files changed, 4 insertions, 0 deletions
diff --git a/app/src/main/java/com/wireguard/android/ConfigActivity.java b/app/src/main/java/com/wireguard/android/ConfigActivity.java
index b3cde478..baa29766 100644
--- a/app/src/main/java/com/wireguard/android/ConfigActivity.java
+++ b/app/src/main/java/com/wireguard/android/ConfigActivity.java
@@ -73,6 +73,10 @@ public class ConfigActivity extends BaseConfigActivity {
// listFragment is guaranteed not to be null at this point by onServiceAvailable().
if (listFragment.getCurrentConfig() != config)
listFragment.setCurrentConfig(config);
+ // Update the activity's title if the list of configurations is not visible.
+ if (!isSplitLayout)
+ setTitle(config != null ? config.getName() : getString(R.string.app_name));
+ // Update the fragment in the main container.
if (isEditing) {
fm.popBackStackImmediate();
isEditing = false;