mirror of
https://github.com/nextcloud/android.git
synced 2024-11-23 05:35:39 +03:00
further cleanups
This commit is contained in:
parent
a04b3e63dc
commit
cb281d3bb1
4 changed files with 39 additions and 42 deletions
|
@ -253,9 +253,8 @@ public class WhatsNewActivity extends FragmentActivity implements ViewPager.OnPa
|
|||
|
||||
return v;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
private final class FeaturesViewAdapter extends FragmentPagerAdapter {
|
||||
|
||||
private FeatureItem[] mFeatures;
|
||||
|
@ -318,5 +317,4 @@ public class WhatsNewActivity extends FragmentActivity implements ViewPager.OnPa
|
|||
return v;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -116,7 +116,7 @@ public class FileListListAdapter extends BaseAdapter {
|
|||
OCFileListFragmentInterface OCFileListFragmentInterface,
|
||||
FileDataStorageManager fileDataStorageManager
|
||||
) {
|
||||
this(justFolders, context, transferServiceGetter, OCFileListFragmentInterface);
|
||||
this(justFolders, context, transferServiceGetter, OCFileListFragmentInterface);
|
||||
mStorageManager = fileDataStorageManager;
|
||||
}
|
||||
|
||||
|
|
|
@ -22,6 +22,5 @@ package com.owncloud.android.ui.events;
|
|||
/**
|
||||
* Event to send push token where it belongs
|
||||
*/
|
||||
|
||||
public class TokenPushEvent {
|
||||
}
|
||||
|
|
|
@ -1332,48 +1332,48 @@ public class OCFileListFragment extends ExtendedListFragment implements OCFileLi
|
|||
|
||||
task.execute(true);
|
||||
|
||||
if (event.getSearchType().equals(SearchOperation.SearchType.FILE_SEARCH)) {
|
||||
setEmptyListMessage(SearchType.FILE_SEARCH);
|
||||
if (event.getSearchType().equals(SearchOperation.SearchType.FILE_SEARCH)) {
|
||||
setEmptyListMessage(SearchType.FILE_SEARCH);
|
||||
|
||||
} else if (event.getSearchType().equals(SearchOperation.SearchType.CONTENT_TYPE_SEARCH)) {
|
||||
if (event.getSearchQuery().equals("image/%")) {
|
||||
setEmptyListMessage(SearchType.PHOTO_SEARCH);
|
||||
menuItemAddRemoveValue = MenuItemAddRemove.REMOVE_GRID_AND_SORT;
|
||||
} else if (event.getSearchQuery().equals("video/%")) {
|
||||
setEmptyListMessage(SearchType.VIDEO_SEARCH);
|
||||
menuItemAddRemoveValue = MenuItemAddRemove.REMOVE_SEARCH;
|
||||
}
|
||||
} else if (event.getSearchType().equals(SearchOperation.SearchType.FAVORITE_SEARCH)) {
|
||||
setEmptyListMessage(SearchType.FAVORITE_SEARCH);
|
||||
menuItemAddRemoveValue = MenuItemAddRemove.REMOVE_SORT;
|
||||
} else if (event.getSearchType().equals(SearchOperation.SearchType.RECENTLY_ADDED_SEARCH)) {
|
||||
setEmptyListMessage(SearchType.RECENTLY_ADDED_SEARCH);
|
||||
menuItemAddRemoveValue = MenuItemAddRemove.REMOVE_SORT;
|
||||
} else if (event.getSearchType().equals(SearchOperation.SearchType.RECENTLY_MODIFIED_SEARCH)) {
|
||||
setEmptyListMessage(SearchType.RECENTLY_MODIFIED_SEARCH);
|
||||
menuItemAddRemoveValue = MenuItemAddRemove.REMOVE_SORT;
|
||||
} else if (event.getSearchType().equals(SearchOperation.SearchType.SHARED_SEARCH)) {
|
||||
setEmptyListMessage(SearchType.SHARED_FILTER);
|
||||
} else if (event.getSearchType().equals(SearchOperation.SearchType.CONTENT_TYPE_SEARCH)) {
|
||||
if (event.getSearchQuery().equals("image/%")) {
|
||||
setEmptyListMessage(SearchType.PHOTO_SEARCH);
|
||||
menuItemAddRemoveValue = MenuItemAddRemove.REMOVE_GRID_AND_SORT;
|
||||
} else if (event.getSearchQuery().equals("video/%")) {
|
||||
setEmptyListMessage(SearchType.VIDEO_SEARCH);
|
||||
menuItemAddRemoveValue = MenuItemAddRemove.REMOVE_SEARCH;
|
||||
}
|
||||
} else if (event.getSearchType().equals(SearchOperation.SearchType.FAVORITE_SEARCH)) {
|
||||
setEmptyListMessage(SearchType.FAVORITE_SEARCH);
|
||||
menuItemAddRemoveValue = MenuItemAddRemove.REMOVE_SORT;
|
||||
} else if (event.getSearchType().equals(SearchOperation.SearchType.RECENTLY_ADDED_SEARCH)) {
|
||||
setEmptyListMessage(SearchType.RECENTLY_ADDED_SEARCH);
|
||||
menuItemAddRemoveValue = MenuItemAddRemove.REMOVE_SORT;
|
||||
} else if (event.getSearchType().equals(SearchOperation.SearchType.RECENTLY_MODIFIED_SEARCH)) {
|
||||
setEmptyListMessage(SearchType.RECENTLY_MODIFIED_SEARCH);
|
||||
menuItemAddRemoveValue = MenuItemAddRemove.REMOVE_SORT;
|
||||
} else if (event.getSearchType().equals(SearchOperation.SearchType.SHARED_SEARCH)) {
|
||||
setEmptyListMessage(SearchType.SHARED_FILTER);
|
||||
menuItemAddRemoveValue = MenuItemAddRemove.REMOVE_SEARCH;
|
||||
}
|
||||
|
||||
if (!currentSearchType.equals(SearchType.FILE_SEARCH) && getActivity() != null) {
|
||||
getActivity().invalidateOptionsMenu();
|
||||
}
|
||||
if (!currentSearchType.equals(SearchType.FILE_SEARCH) && getActivity() != null) {
|
||||
getActivity().invalidateOptionsMenu();
|
||||
}
|
||||
|
||||
if (currentSearchType.equals(SearchType.PHOTO_SEARCH)) {
|
||||
new Handler(Looper.getMainLooper()).post(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
switchToGridView();
|
||||
}
|
||||
});
|
||||
} else if (currentSearchType.equals(SearchType.NO_SEARCH) || currentSearchType.equals(
|
||||
SearchType.REGULAR_FILTER)) {
|
||||
new Handler(Looper.getMainLooper()).post(switchViewsRunnable);
|
||||
} else {
|
||||
new Handler(Looper.getMainLooper()).post(switchViewsRunnable);
|
||||
}
|
||||
if (currentSearchType.equals(SearchType.PHOTO_SEARCH)) {
|
||||
new Handler(Looper.getMainLooper()).post(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
switchToGridView();
|
||||
}
|
||||
});
|
||||
} else if (currentSearchType.equals(SearchType.NO_SEARCH) || currentSearchType.equals(
|
||||
SearchType.REGULAR_FILTER)) {
|
||||
new Handler(Looper.getMainLooper()).post(switchViewsRunnable);
|
||||
} else {
|
||||
new Handler(Looper.getMainLooper()).post(switchViewsRunnable);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
Loading…
Reference in a new issue