Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -101,9 +101,6 @@ public interface UserAccountManager extends CurrentAccountProvider {
@NonNull
OwnCloudVersion getServerVersion(Account account);

@Deprecated
boolean isSearchSupported(@Nullable Account account);

/**
* Check if user's account supports media streaming. This is a property of server where user has his account.
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -306,11 +306,6 @@ public OwnCloudVersion getServerVersion(Account account) {
return serverVersion;
}

@Override
public boolean isSearchSupported(Account account) {
return account != null && getServerVersion(account).isSearchSupported();
}

@Override
public boolean isMediaStreamingSupported(Account account) {
return account != null && getServerVersion(account).isMediaStreamingSupported();
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/com/owncloud/android/MainApp.java
Original file line number Diff line number Diff line change
Expand Up @@ -122,8 +122,8 @@
*/
public class MainApp extends MultiDexApplication implements HasAndroidInjector {

public static final OwnCloudVersion OUTDATED_SERVER_VERSION = OwnCloudVersion.nextcloud_13;
public static final OwnCloudVersion MINIMUM_SUPPORTED_SERVER_VERSION = OwnCloudVersion.nextcloud_12;
public static final OwnCloudVersion OUTDATED_SERVER_VERSION = OwnCloudVersion.nextcloud_15;
public static final OwnCloudVersion MINIMUM_SUPPORTED_SERVER_VERSION = OwnCloudVersion.nextcloud_13;

private static final String TAG = MainApp.class.getSimpleName();
public static final String DOT = ".";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1307,7 +1307,7 @@ private void onGetServerInfoFinish(RemoteOperationResult result) {
DisplayUtils.showServerOutdatedSnackbar(this, Snackbar.LENGTH_INDEFINITE);
}

webViewLoginMethod = mServerInfo.mVersion.isWebLoginSupported() && !forceOldLoginMethod;
webViewLoginMethod = !forceOldLoginMethod;

if (webViewUser != null && !webViewUser.isEmpty() &&
webViewPassword != null && !webViewPassword.isEmpty()) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -371,9 +371,7 @@ private void filterDrawerMenu(final Menu menu, @NonNull final User user) {
getContentResolver());
OCCapability capability = storageManager.getCapability(user.getAccountName());

boolean hasSearchSupport = user.getServer().getVersion().isSearchSupported();

DrawerMenuUtil.filterSearchMenuItems(menu, user.toPlatformAccount(), getResources(), hasSearchSupport);
DrawerMenuUtil.filterSearchMenuItems(menu, user.toPlatformAccount(), getResources(), true);
DrawerMenuUtil.filterTrashbinMenuItem(menu, user.toPlatformAccount(), capability, accountManager);
DrawerMenuUtil.filterActivityMenuItem(menu, capability);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,6 @@
import android.widget.TextView;

import com.google.android.material.floatingactionbutton.FloatingActionButton;
import com.nextcloud.client.account.User;
import com.nextcloud.client.account.UserAccountManager;
import com.nextcloud.client.di.Injectable;
import com.nextcloud.client.preferences.AppPreferences;
Expand Down Expand Up @@ -305,14 +304,10 @@ private void performSearch(final String query, boolean isSubmit) {
handler.postDelayed(new Runnable() {
@Override
public void run() {
User user = accountManager.getUser();
if (user.getServer().getVersion().isSearchSupported()) {
EventBus.getDefault().post(new SearchEvent(query,
SearchRemoteOperation.SearchType.FILE_SEARCH, SearchEvent.UnsetType.NO_UNSET));
} else {
OCFileListAdapter fileListListAdapter = (OCFileListAdapter) adapter;
fileListListAdapter.getFilter().filter(query);
}
EventBus.getDefault().post(new SearchEvent(query,
SearchRemoteOperation.SearchType.FILE_SEARCH,
SearchEvent.UnsetType.NO_UNSET));

}
}, delay);
} else if (adapter instanceof LocalFileListAdapter) {
Expand Down