Set visibility of interface implementations to internal
This commit is contained in:
parent
a71efdf4b2
commit
d85da0361d
@ -25,7 +25,7 @@ interface AppRepository {
|
||||
fun getSuspendedPackages(): Flow<List<String>>
|
||||
}
|
||||
|
||||
class AppRepositoryImpl(
|
||||
internal class AppRepositoryImpl(
|
||||
private val context: Context,
|
||||
hiddenItemsRepository: HiddenItemsRepository,
|
||||
) : AppRepository {
|
||||
|
||||
@ -27,7 +27,7 @@ interface CalendarRepository {
|
||||
suspend fun getCalendars(): List<UserCalendar>
|
||||
}
|
||||
|
||||
class CalendarRepositoryImpl(
|
||||
internal class CalendarRepositoryImpl(
|
||||
private val context: Context,
|
||||
hiddenItemsRepository: HiddenItemsRepository
|
||||
) : CalendarRepository, KoinComponent {
|
||||
|
||||
@ -17,7 +17,7 @@ interface ContactRepository {
|
||||
fun search(query: String): Flow<List<Contact>>
|
||||
}
|
||||
|
||||
class ContactRepositoryImpl(
|
||||
internal class ContactRepositoryImpl(
|
||||
private val context: Context,
|
||||
hiddenItemsRepository: HiddenItemsRepository
|
||||
) : ContactRepository, KoinComponent {
|
||||
|
||||
@ -31,7 +31,7 @@ interface FavoritesRepository {
|
||||
fun getHiddenItems(): Flow<List<Searchable>>
|
||||
}
|
||||
|
||||
class FavoritesRepositoryImpl(
|
||||
internal class FavoritesRepositoryImpl(
|
||||
private val context: Context,
|
||||
private val database: AppDatabase
|
||||
) : FavoritesRepository, KoinComponent {
|
||||
|
||||
@ -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()
|
||||
|
||||
@ -47,7 +47,7 @@ interface MusicRepository {
|
||||
fun resetPlayer()
|
||||
}
|
||||
|
||||
class MusicRepositoryImpl(
|
||||
internal class MusicRepositoryImpl(
|
||||
private val context: Context,
|
||||
private val notificationRepository: NotificationRepository
|
||||
) : MusicRepository, KoinComponent {
|
||||
|
||||
@ -55,7 +55,7 @@ enum class PermissionGroup {
|
||||
Notifications,
|
||||
}
|
||||
|
||||
class PermissionsManagerImpl(
|
||||
internal class PermissionsManagerImpl(
|
||||
private val context: Context
|
||||
) : PermissionsManager {
|
||||
|
||||
|
||||
@ -17,7 +17,7 @@ interface WebsearchRepository {
|
||||
fun deleteWebsearch(websearch: Websearch)
|
||||
}
|
||||
|
||||
class WebsearchRepositoryImpl(
|
||||
internal class WebsearchRepositoryImpl(
|
||||
private val database: AppDatabase
|
||||
) : WebsearchRepository, KoinComponent {
|
||||
|
||||
|
||||
@ -16,7 +16,7 @@ interface UnitConverterRepository {
|
||||
fun search(query:String): Flow<UnitConverter?>
|
||||
}
|
||||
|
||||
class UnitConverterRepositoryImpl(val context: Context) : UnitConverterRepository, KoinComponent {
|
||||
internal class UnitConverterRepositoryImpl(val context: Context) : UnitConverterRepository, KoinComponent {
|
||||
private val dataStore: LauncherDataStore by inject()
|
||||
|
||||
val unitConverter = MutableLiveData<UnitConverter?>()
|
||||
|
||||
@ -43,7 +43,7 @@ interface WeatherRepository {
|
||||
fun clearForecasts()
|
||||
}
|
||||
|
||||
class WeatherRepositoryImpl(
|
||||
internal class WeatherRepositoryImpl(
|
||||
private val context: Context,
|
||||
private val database: AppDatabase,
|
||||
private val dataStore: LauncherDataStore,
|
||||
|
||||
@ -28,7 +28,7 @@ interface WebsiteRepository {
|
||||
fun search(query: String): Flow<Website?>
|
||||
}
|
||||
|
||||
class WebsiteRepositoryImpl(val context: Context) : WebsiteRepository, KoinComponent {
|
||||
internal class WebsiteRepositoryImpl(val context: Context) : WebsiteRepository, KoinComponent {
|
||||
|
||||
private val dataStore: LauncherDataStore by inject()
|
||||
|
||||
|
||||
@ -18,7 +18,7 @@ interface WikipediaRepository {
|
||||
fun search(query: String): Flow<Wikipedia?>
|
||||
}
|
||||
|
||||
class WikipediaRepositoryImpl(
|
||||
internal class WikipediaRepositoryImpl(
|
||||
private val context: Context
|
||||
) : WikipediaRepository, KoinComponent {
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user