Signed-off-by: tobiasKaminsky <tobias@kaminsky.me>
This commit is contained in:
tobiasKaminsky 2020-06-05 08:02:12 +02:00
Родитель d1f17df63c
Коммит fe8b0fba77
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 0E00D4D47D0C5AF7
6 изменённых файлов: 5 добавлений и 71 удалений

Просмотреть файл

@ -1 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" width="24" height="24" viewBox="0 0 24 24"><path d="M3,13H15V11H3M3,6V8H21V6M3,18H9V16H3V18Z" /></svg>

До

Ширина:  |  Высота:  |  Размер: 335 B

Просмотреть файл

@ -70,8 +70,6 @@ import androidx.appcompat.app.ActionBar;
import androidx.fragment.app.Fragment;
import androidx.fragment.app.FragmentTransaction;
import static com.owncloud.android.utils.DisplayUtils.openSortingOrderDialogFragment;
public class FolderPickerActivity extends FileActivity implements FileFragment.ContainerActivity,
OnClickListener,
OnEnforceableRefreshListener,
@ -321,11 +319,6 @@ public class FolderPickerActivity extends FileActivity implements FileFragment.C
}
break;
}
case R.id.action_sort: {
openSortingOrderDialogFragment(getSupportFragmentManager(),
preferences.getSortOrderByFolder(getListOfFilesFragment().getCurrentFile()));
break;
}
default:
retval = super.onOptionsItemSelected(item);
break;

Просмотреть файл

@ -195,11 +195,13 @@ public class OCFileListFragment extends ExtendedListFragment implements
@Inject DeviceInfo deviceInfo;
protected enum MenuItemAddRemove {
DO_NOTHING, REMOVE_SORT, REMOVE_GRID_AND_SORT, ADD_SORT, ADD_GRID_AND_SORT, ADD_GRID_AND_SORT_WITH_SEARCH,
REMOVE_SEARCH, REMOVE_ALL_EXCEPT_SEARCH
DO_NOTHING,
REMOVE_SORT,
REMOVE_GRID_AND_SORT,
ADD_GRID_AND_SORT_WITH_SEARCH
}
protected MenuItemAddRemove menuItemAddRemoveValue = MenuItemAddRemove.REMOVE_ALL_EXCEPT_SEARCH;
protected MenuItemAddRemove menuItemAddRemoveValue = MenuItemAddRemove.DO_NOTHING;
private List<MenuItem> mOriginalMenuItems = new ArrayList<>();
@ -770,30 +772,13 @@ public class OCFileListFragment extends ExtendedListFragment implements
mOriginalMenuItems.add(menu.findItem(R.id.action_search));
}
MenuItem menuItemOrig;
switch (menuItemAddRemoveValue) {
case ADD_SORT:
if (menu.findItem(R.id.action_sort) == null) {
menuItemOrig = mOriginalMenuItems.get(1);
menu.add(menuItemOrig.getGroupId(), menuItemOrig.getItemId(), menuItemOrig.getOrder(),
menuItemOrig.getTitle());
}
mSortButton.setVisibility(View.VISIBLE);
break;
case ADD_GRID_AND_SORT:
case ADD_GRID_AND_SORT_WITH_SEARCH:
mSwitchGridViewButton.setVisibility(View.VISIBLE);
mSortButton.setVisibility(View.VISIBLE);
break;
case REMOVE_SEARCH:
menu.removeItem(R.id.action_search);
break;
case REMOVE_SORT:
menu.removeItem(R.id.action_search);
mSortButton.setVisibility(View.GONE);
break;
@ -803,11 +788,6 @@ public class OCFileListFragment extends ExtendedListFragment implements
mSwitchGridViewButton.setVisibility(View.GONE);
break;
case REMOVE_ALL_EXCEPT_SEARCH:
mSwitchGridViewButton.setVisibility(View.VISIBLE);
mSortButton.setVisibility(View.VISIBLE);
break;
case DO_NOTHING:
default:
Log_OC.v(TAG, "Kept the options menu default structure");

Просмотреть файл

@ -140,13 +140,6 @@ public class PreviewTextStringFragment extends PreviewTextFragment {
}
}
@Override
public void onPrepareOptionsMenu(@NonNull Menu menu) {
super.onPrepareOptionsMenu(menu);
menu.findItem(R.id.action_sort).setVisible(false);
}
void loadAndShowTextPreview() {
if (mTextPreview != null) {
mOriginalText = getFile().getRichWorkspace();

Просмотреть файл

@ -1,23 +0,0 @@
<!--
@author Google LLC
Copyright (C) 2018 Google LLC
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:height="24dp"
android:width="24dp"
android:viewportWidth="24"
android:viewportHeight="24">
<path android:fillColor="#FFFFFF" android:pathData="M3,13H15V11H3M3,6V8H21V6M3,18H9V16H3V18Z" />
</vector>

Просмотреть файл

@ -35,12 +35,4 @@
android:orderInCategory="1"
android:title="@string/actionbar_mkdir"
app:showAsAction="never" />
<item
android:id="@+id/action_sort"
android:contentDescription="@string/actionbar_sort"
android:icon="@drawable/ic_sort_variant"
android:orderInCategory="1"
android:title="@string/actionbar_sort"
app:showAsAction="never" />
</menu>