mirror of
https://github.com/nextcloud/android.git
synced 2024-11-26 23:28:42 +03:00
Clean up unused resources
Signed-off-by: Álvaro Brey <alvaro.brey@nextcloud.com>
This commit is contained in:
parent
b43df7c711
commit
a160ccd936
4 changed files with 49 additions and 284 deletions
|
@ -177,7 +177,6 @@ public class FileMenuFilter {
|
|||
filterStream(toHide);
|
||||
filterLock(toHide, fileLockingEnabled);
|
||||
filterUnlock(toHide, fileLockingEnabled);
|
||||
filterLockInfo(toHide, fileLockingEnabled);
|
||||
|
||||
return toHide;
|
||||
}
|
||||
|
@ -243,17 +242,6 @@ public class FileMenuFilter {
|
|||
}
|
||||
}
|
||||
|
||||
private void filterLockInfo(List<Integer> toHide, boolean fileLockingEnabled) {
|
||||
if (files.isEmpty() || !isSingleSelection() || !fileLockingEnabled) {
|
||||
toHide.add(R.id.menu_group_lock_info);
|
||||
} else {
|
||||
OCFile file = files.iterator().next();
|
||||
if (!file.isLocked()) {
|
||||
toHide.add(R.id.menu_group_lock_info);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void filterEncrypt(List<Integer> toHide, boolean endToEndEncryptionEnabled) {
|
||||
if (files.isEmpty() || !isSingleSelection() || isSingleFile() || isEncryptedFolder() || isGroupFolder()
|
||||
|| !endToEndEncryptionEnabled || !isEmptyFolder()) {
|
||||
|
|
|
@ -1,82 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
Nextcloud Android client application
|
||||
|
||||
Copyright (C) 2018 Andy Scherzinger
|
||||
|
||||
This program is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE
|
||||
License as published by the Free Software Foundation; either
|
||||
version 3 of the License, or any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU AFFERO GENERAL PUBLIC LICENSE for more details.
|
||||
|
||||
You should have received a copy of the GNU Affero General Public
|
||||
License along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
-->
|
||||
<menu xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
tools:ignore="AppCompatResource">
|
||||
|
||||
<item
|
||||
android:id="@+id/action_rename_file"
|
||||
android:title="@string/common_rename"
|
||||
app:showAsAction="never"
|
||||
android:showAsAction="never" />
|
||||
<item
|
||||
android:id="@+id/action_download_file"
|
||||
android:title="@string/filedetails_download"
|
||||
app:showAsAction="never"
|
||||
android:showAsAction="never" />
|
||||
<item
|
||||
android:id="@+id/action_export_file"
|
||||
android:title="@string/filedetails_export"
|
||||
app:showAsAction="never"
|
||||
android:showAsAction="never" />
|
||||
<item
|
||||
android:id="@+id/action_send_file"
|
||||
android:title="@string/common_send"
|
||||
app:showAsAction="never"
|
||||
android:showAsAction="never"
|
||||
android:icon="@drawable/ic_share" />
|
||||
<item
|
||||
android:id="@+id/action_open_file_with"
|
||||
android:title="@string/actionbar_open_with"
|
||||
app:showAsAction="never"
|
||||
android:showAsAction="never" />
|
||||
<item
|
||||
android:id="@+id/action_sync_file"
|
||||
android:title="@string/filedetails_sync_file"
|
||||
app:showAsAction="never"
|
||||
android:showAsAction="never" />
|
||||
<item
|
||||
android:id="@+id/action_cancel_sync"
|
||||
android:title="@string/common_cancel_sync"
|
||||
app:showAsAction="never"
|
||||
android:showAsAction="never" />
|
||||
<item
|
||||
android:id="@+id/action_encrypted"
|
||||
android:title="@string/encrypted"
|
||||
app:showAsAction="never"
|
||||
android:showAsAction="never" />
|
||||
<item
|
||||
android:id="@+id/action_unset_encrypted"
|
||||
android:title="@string/unset_encrypted"
|
||||
app:showAsAction="never"
|
||||
android:showAsAction="never" />
|
||||
<item
|
||||
android:id="@+id/action_set_as_wallpaper"
|
||||
android:title="@string/set_picture_as"
|
||||
app:showAsAction="never"
|
||||
android:showAsAction="never" />
|
||||
<item
|
||||
android:id="@+id/action_remove_file"
|
||||
android:title="@string/common_remove"
|
||||
app:showAsAction="never"
|
||||
android:showAsAction="never" />
|
||||
|
||||
</menu>
|
|
@ -1,190 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
ownCloud Android client application
|
||||
|
||||
Copyright (C) 2012 Bartek Przybylski
|
||||
Copyright (C) 2015 ownCloud Inc.
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License version 2,
|
||||
as published by the Free Software Foundation.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
-->
|
||||
<menu xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
tools:ignore="AppCompatResource">
|
||||
|
||||
<group
|
||||
android:id="@+id/menu_group_lock_info"
|
||||
android:visible="false"
|
||||
android:enabled="false"
|
||||
tools:visible="true">
|
||||
|
||||
<item
|
||||
android:id="@+id/action_locked_by"
|
||||
android:showAsAction="never"
|
||||
android:title="Locked by %1$s"
|
||||
android:enabled="false"
|
||||
app:showAsAction="never"
|
||||
tools:ignore="HardcodedText"
|
||||
tools:title="Locked by Username With Surname at bla bla bla bla bla" />
|
||||
|
||||
<item
|
||||
android:id="@+id/action_locked_until"
|
||||
android:showAsAction="never"
|
||||
android:enabled="false"
|
||||
android:title="Lock expires: %1$s"
|
||||
app:showAsAction="never"
|
||||
tools:ignore="HardcodedText"
|
||||
tools:title="Lock expires: in 20 minutes" />
|
||||
</group>
|
||||
|
||||
<item
|
||||
android:id="@+id/action_unlock_file"
|
||||
android:showAsAction="never"
|
||||
android:title="@string/unlock_file"
|
||||
app:showAsAction="never" />
|
||||
|
||||
<item
|
||||
android:id="@+id/action_edit"
|
||||
android:title="@string/action_edit"
|
||||
app:showAsAction="never"
|
||||
android:showAsAction="never" />
|
||||
|
||||
<item
|
||||
android:id="@+id/action_favorite"
|
||||
android:title="@string/favorite"
|
||||
app:showAsAction="never"
|
||||
android:showAsAction="never" />
|
||||
|
||||
<item
|
||||
android:id="@+id/action_unset_favorite"
|
||||
android:title="@string/unset_favorite"
|
||||
app:showAsAction="never"
|
||||
android:showAsAction="never" />
|
||||
|
||||
<item
|
||||
android:id="@+id/action_see_details"
|
||||
android:title="@string/actionbar_see_details"
|
||||
app:showAsAction="never"
|
||||
android:showAsAction="never" />
|
||||
|
||||
<item
|
||||
android:id="@+id/action_lock_file"
|
||||
android:showAsAction="never"
|
||||
android:title="@string/lock_file"
|
||||
app:showAsAction="never" />
|
||||
|
||||
<item
|
||||
android:id="@+id/action_rename_file"
|
||||
android:title="@string/common_rename"
|
||||
app:showAsAction="never"
|
||||
android:showAsAction="never" />
|
||||
|
||||
<item
|
||||
android:id="@+id/action_move"
|
||||
android:title="@string/actionbar_move"
|
||||
app:showAsAction="never"
|
||||
android:showAsAction="never" />
|
||||
|
||||
<item
|
||||
android:id="@+id/action_copy"
|
||||
android:title="@string/actionbar_copy"
|
||||
app:showAsAction="never"
|
||||
android:showAsAction="never" />
|
||||
|
||||
<item
|
||||
android:id="@+id/action_download_file"
|
||||
android:title="@string/filedetails_download"
|
||||
app:showAsAction="never"
|
||||
android:showAsAction="never" />
|
||||
|
||||
<item
|
||||
android:id="@+id/action_export_file"
|
||||
android:title="@string/filedetails_export"
|
||||
app:showAsAction="never"
|
||||
android:showAsAction="never" />
|
||||
|
||||
<item
|
||||
android:id="@+id/action_stream_media"
|
||||
android:title="@string/stream"
|
||||
app:showAsAction="never"
|
||||
android:showAsAction="never"
|
||||
android:orderInCategory="1" />
|
||||
|
||||
<item
|
||||
android:id="@+id/action_send_share_file"
|
||||
android:title="@string/action_send_share"
|
||||
app:showAsAction="never"
|
||||
android:showAsAction="never"
|
||||
android:icon="@drawable/ic_share" />
|
||||
|
||||
<item
|
||||
android:id="@+id/action_send_file"
|
||||
android:title="@string/common_send"
|
||||
app:showAsAction="never"
|
||||
android:showAsAction="never"
|
||||
android:icon="@drawable/ic_share" />
|
||||
|
||||
<item
|
||||
android:id="@+id/action_open_file_with"
|
||||
android:title="@string/actionbar_open_with"
|
||||
app:showAsAction="never"
|
||||
android:showAsAction="never" />
|
||||
|
||||
<item
|
||||
android:id="@+id/action_sync_file"
|
||||
android:title="@string/filedetails_sync_file"
|
||||
app:showAsAction="never"
|
||||
android:showAsAction="never" />
|
||||
<item
|
||||
android:id="@+id/action_cancel_sync"
|
||||
android:title="@string/common_cancel_sync"
|
||||
app:showAsAction="never"
|
||||
android:showAsAction="never" />
|
||||
|
||||
<item
|
||||
android:id="@+id/action_select_all_action_menu"
|
||||
android:title="@string/select_all"
|
||||
app:showAsAction="never"
|
||||
android:showAsAction="never" />
|
||||
|
||||
<item
|
||||
android:id="@+id/action_deselect_all_action_menu"
|
||||
android:title="@string/deselect_all"
|
||||
app:showAsAction="never"
|
||||
android:showAsAction="never" />
|
||||
|
||||
<item
|
||||
android:id="@+id/action_encrypted"
|
||||
android:title="@string/encrypted"
|
||||
app:showAsAction="never"
|
||||
android:showAsAction="never" />
|
||||
|
||||
<item
|
||||
android:id="@+id/action_unset_encrypted"
|
||||
android:title="@string/unset_encrypted"
|
||||
app:showAsAction="never"
|
||||
android:showAsAction="never" />
|
||||
|
||||
<item
|
||||
android:id="@+id/action_set_as_wallpaper"
|
||||
android:title="@string/set_picture_as"
|
||||
app:showAsAction="never"
|
||||
android:showAsAction="never" />
|
||||
|
||||
<item
|
||||
android:id="@+id/action_remove_file"
|
||||
android:title="@string/common_remove"
|
||||
app:showAsAction="never"
|
||||
android:showAsAction="never" />
|
||||
|
||||
</menu>
|
49
app/src/main/res/values/ids.xml
Normal file
49
app/src/main/res/values/ids.xml
Normal file
|
@ -0,0 +1,49 @@
|
|||
<?xml version="1.0" encoding="utf-8"?><!--
|
||||
~ Nextcloud Android client application
|
||||
~
|
||||
~ @author Álvaro Brey
|
||||
~ Copyright (C) 2022 Álvaro Brey
|
||||
~ Copyright (C) 2022 Nextcloud GmbH
|
||||
~
|
||||
~ This program is free software; you can redistribute it and/or
|
||||
~ modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE
|
||||
~ License as published by the Free Software Foundation; either
|
||||
~ version 3 of the License, or any later version.
|
||||
~
|
||||
~ This program is distributed in the hope that it will be useful,
|
||||
~ but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
~ GNU AFFERO GENERAL PUBLIC LICENSE for more details.
|
||||
~
|
||||
~ You should have received a copy of the GNU Affero General Public
|
||||
~ License along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
~
|
||||
-->
|
||||
|
||||
<resources>
|
||||
<item name="action_locked_by" type="id"/>
|
||||
<item name="action_locked_until" type="id"/>
|
||||
<item name="action_unlock_file" type="id"/>
|
||||
<item name="action_edit" type="id"/>
|
||||
<item name="action_favorite" type="id"/>
|
||||
<item name="action_unset_favorite" type="id"/>
|
||||
<item name="action_see_details" type="id"/>
|
||||
<item name="action_lock_file" type="id"/>
|
||||
<item name="action_rename_file" type="id"/>
|
||||
<item name="action_move" type="id"/>
|
||||
<item name="action_copy" type="id"/>
|
||||
<item name="action_download_file" type="id"/>
|
||||
<item name="action_export_file" type="id"/>
|
||||
<item name="action_stream_media" type="id"/>
|
||||
<item name="action_send_share_file" type="id"/>
|
||||
<item name="action_send_file" type="id"/>
|
||||
<item name="action_open_file_with" type="id"/>
|
||||
<item name="action_sync_file" type="id"/>
|
||||
<item name="action_cancel_sync" type="id"/>
|
||||
<item name="action_select_all_action_menu" type="id"/>
|
||||
<item name="action_deselect_all_action_menu" type="id"/>
|
||||
<item name="action_encrypted" type="id"/>
|
||||
<item name="action_unset_encrypted" type="id"/>
|
||||
<item name="action_set_as_wallpaper" type="id"/>
|
||||
<item name="action_remove_file" type="id"/>
|
||||
</resources>
|
Loading…
Reference in a new issue