Set visibility of interface implementations to internal

This commit is contained in:
MM20 2022-01-17 00:16:00 +01:00
parent a71efdf4b2
commit d85da0361d
No known key found for this signature in database
GPG Key ID: 0B61A8F2DEAFA389
14 changed files with 16 additions and 18 deletions

View File

@ -25,7 +25,7 @@ interface AppRepository {
fun getSuspendedPackages(): Flow<List<String>>
}
class AppRepositoryImpl(
internal class AppRepositoryImpl(
private val context: Context,
hiddenItemsRepository: HiddenItemsRepository,
) : AppRepository {

View File

@ -27,7 +27,7 @@ interface CalendarRepository {
suspend fun getCalendars(): List<UserCalendar>
}
class CalendarRepositoryImpl(
internal class CalendarRepositoryImpl(
private val context: Context,
hiddenItemsRepository: HiddenItemsRepository
) : CalendarRepository, KoinComponent {

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -47,7 +47,7 @@ interface MusicRepository {
fun resetPlayer()
}
class MusicRepositoryImpl(
internal class MusicRepositoryImpl(
private val context: Context,
private val notificationRepository: NotificationRepository
) : MusicRepository, KoinComponent {

View File

@ -55,7 +55,7 @@ enum class PermissionGroup {
Notifications,
}
class PermissionsManagerImpl(
internal class PermissionsManagerImpl(
private val context: Context
) : PermissionsManager {

View File

@ -17,7 +17,7 @@ interface WebsearchRepository {
fun deleteWebsearch(websearch: Websearch)
}
class WebsearchRepositoryImpl(
internal class WebsearchRepositoryImpl(
private val database: AppDatabase
) : WebsearchRepository, KoinComponent {

View File

@ -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?>()

View File

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

View File

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

View File

@ -18,7 +18,7 @@ interface WikipediaRepository {
fun search(query: String): Flow<Wikipedia?>
}
class WikipediaRepositoryImpl(
internal class WikipediaRepositoryImpl(
private val context: Context
) : WikipediaRepository, KoinComponent {