Rename MusicRepository -> MusicService

This commit is contained in:
MM20
2023-02-12 22:41:48 +01:00
parent fc2e239dfa
commit dbdce7bcab
5 changed files with 35 additions and 35 deletions
@@ -4,5 +4,5 @@ import org.koin.android.ext.koin.androidContext
import org.koin.dsl.module
val musicModule = module {
single<MusicRepository> { MusicRepositoryImpl(androidContext(), get()) }
single<MusicService> { MusicServiceImpl(androidContext(), get()) }
}
@@ -44,7 +44,7 @@ import org.koin.core.component.KoinComponent
import org.koin.core.component.inject
import java.io.IOException
interface MusicRepository {
interface MusicService {
val playbackState: Flow<PlaybackState>
val title: Flow<String?>
val artist: Flow<String?>
@@ -65,10 +65,10 @@ interface MusicRepository {
fun resetPlayer()
}
internal class MusicRepositoryImpl(
internal class MusicServiceImpl(
private val context: Context,
notificationRepository: NotificationRepository
) : MusicRepository, KoinComponent {
) : MusicService, KoinComponent {
private val scope = CoroutineScope(Job() + Dispatchers.Default)
private val dataStore: LauncherDataStore by inject()