From 333b544001ffa562c7f6be9585076efbffa426d5 Mon Sep 17 00:00:00 2001 From: Joe Apicella Date: Wed, 25 Oct 2017 21:41:19 -0700 Subject: [PATCH] modify default display name for root folder --- .../java/com/owncloud/android/utils/ThemeUtils.java | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/src/main/java/com/owncloud/android/utils/ThemeUtils.java b/src/main/java/com/owncloud/android/utils/ThemeUtils.java index 6d329e5d13..8fe9f43ee8 100644 --- a/src/main/java/com/owncloud/android/utils/ThemeUtils.java +++ b/src/main/java/com/owncloud/android/utils/ThemeUtils.java @@ -224,11 +224,16 @@ public final class ThemeUtils { public static String getDefaultDisplayNameForRootFolder(Context context) { OCCapability capability = getCapability(context); - if (capability.getServerName() == null || capability.getServerName().isEmpty()) { - return MainApp.getAppContext().getResources().getString(R.string.default_display_name_for_root_folder); + if (MainApp.isOnlyOnDevice()) { + return MainApp.getAppContext().getString(R.string.drawer_item_on_device); } else { - return capability.getServerName(); + if (capability.getServerName() == null || capability.getServerName().isEmpty()) { + return MainApp.getAppContext().getResources().getString(R.string.default_display_name_for_root_folder); + } else { + return capability.getServerName(); + } } + } public static void setStatusBarColor(Activity activity, @ColorInt int color) {