mirror of
https://github.com/nextcloud/android.git
synced 2024-11-23 13:45:35 +03:00
modify default display name for root folder
This commit is contained in:
parent
6e98e25184
commit
333b544001
1 changed files with 8 additions and 3 deletions
|
@ -224,6 +224,9 @@ public final class ThemeUtils {
|
|||
public static String getDefaultDisplayNameForRootFolder(Context context) {
|
||||
OCCapability capability = getCapability(context);
|
||||
|
||||
if (MainApp.isOnlyOnDevice()) {
|
||||
return MainApp.getAppContext().getString(R.string.drawer_item_on_device);
|
||||
} else {
|
||||
if (capability.getServerName() == null || capability.getServerName().isEmpty()) {
|
||||
return MainApp.getAppContext().getResources().getString(R.string.default_display_name_for_root_folder);
|
||||
} else {
|
||||
|
@ -231,6 +234,8 @@ public final class ThemeUtils {
|
|||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public static void setStatusBarColor(Activity activity, @ColorInt int color) {
|
||||
if (activity != null && Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
|
||||
activity.getWindow().setStatusBarColor(color);
|
||||
|
|
Loading…
Reference in a new issue