Set visibility of interface implementations to internal
This commit is contained in:
@@ -19,7 +19,7 @@ interface FileRepository {
|
||||
suspend fun deleteFile(file: File)
|
||||
}
|
||||
|
||||
class FileRepositoryImpl(
|
||||
internal class FileRepositoryImpl(
|
||||
private val context: Context,
|
||||
hiddenItemsRepository: HiddenItemsRepository,
|
||||
private val dataStore: LauncherDataStore
|
||||
|
||||
@@ -4,16 +4,16 @@ import android.content.Context
|
||||
import de.mm20.launcher2.files.R
|
||||
import de.mm20.launcher2.msservices.DriveItem
|
||||
import de.mm20.launcher2.msservices.MicrosoftGraphApiHelper
|
||||
import de.mm20.launcher2.preferences.LauncherPreferences
|
||||
import de.mm20.launcher2.search.data.File
|
||||
import de.mm20.launcher2.search.data.OneDriveFile
|
||||
|
||||
internal class OneDriveFileProvider(
|
||||
private val context: Context
|
||||
): FileProvider {
|
||||
) : FileProvider {
|
||||
override suspend fun search(query: String): List<File> {
|
||||
if (query.length < 4) return emptyList()
|
||||
val driveItems = MicrosoftGraphApiHelper.getInstance(context).queryOneDriveFiles(query) ?: return emptyList()
|
||||
val driveItems = MicrosoftGraphApiHelper.getInstance(context).queryOneDriveFiles(query)
|
||||
?: return emptyList()
|
||||
val files = mutableListOf<OneDriveFile>()
|
||||
for (driveItem in driveItems) {
|
||||
files += OneDriveFile(
|
||||
|
||||
@@ -1,15 +1,13 @@
|
||||
package de.mm20.launcher2.files.providers
|
||||
|
||||
import de.mm20.launcher2.files.R
|
||||
import de.mm20.launcher2.helper.NetworkUtils
|
||||
import de.mm20.launcher2.owncloud.OwncloudClient
|
||||
import de.mm20.launcher2.preferences.LauncherPreferences
|
||||
import de.mm20.launcher2.search.data.File
|
||||
import de.mm20.launcher2.search.data.OwncloudFile
|
||||
|
||||
internal class OwncloudFileProvider(
|
||||
private val owncloudClient: OwncloudClient
|
||||
): FileProvider {
|
||||
) : FileProvider {
|
||||
override suspend fun search(query: String): List<File> {
|
||||
if (query.length < 4) return emptyList()
|
||||
val server = owncloudClient.getServer() ?: return emptyList()
|
||||
|
||||
Reference in New Issue
Block a user