further cleanups

This commit is contained in:
AndyScherzinger 2017-04-19 17:41:20 +02:00
parent a04b3e63dc
commit cb281d3bb1
No known key found for this signature in database
GPG key ID: 6CADC7E3523C308B
4 changed files with 39 additions and 42 deletions

View file

@ -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;
}
}
}

View file

@ -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;
}

View file

@ -22,6 +22,5 @@ package com.owncloud.android.ui.events;
/**
* Event to send push token where it belongs
*/
public class TokenPushEvent {
}

View file

@ -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