mirror of
https://github.com/IllusionMan1212/lyrics-grabbr.git
synced 2026-10-24 02:12:27 +00:00
remove spotify as lyrics source
In order to stay on f-droid spotify has to be removed. Doing different flavors is not worth it in my opinion.
This commit is contained in:
@@ -5,7 +5,6 @@ import android.content.Context
|
||||
import androidx.datastore.core.DataStore
|
||||
import androidx.datastore.preferences.core.Preferences
|
||||
import androidx.datastore.preferences.preferencesDataStore
|
||||
import com.adamratzman.spotify.auth.SpotifyDefaultCredentialStore
|
||||
import com.illusionman1212.lyricsgrabbr.data.HomeRepository
|
||||
import com.illusionman1212.lyricsgrabbr.data.LyricsRepository
|
||||
import com.illusionman1212.lyricsgrabbr.data.SettingsPreferencesRepository
|
||||
@@ -15,24 +14,15 @@ private val Context.dataStore: DataStore<Preferences> by preferencesDataStore(
|
||||
name = PREFERENCES_NAME
|
||||
)
|
||||
|
||||
const val SPOTIFY_REDIRECT_URI = "lyricsgrabbr://spotify-auth"
|
||||
|
||||
class LGApp: Application() {
|
||||
lateinit var settingsPreferencesRepository: SettingsPreferencesRepository
|
||||
lateinit var homeRepository: HomeRepository
|
||||
lateinit var lyricsRepository: LyricsRepository
|
||||
val credentialStore by lazy {
|
||||
SpotifyDefaultCredentialStore(
|
||||
clientId = "",
|
||||
redirectUri = SPOTIFY_REDIRECT_URI,
|
||||
applicationContext = applicationContext
|
||||
)
|
||||
}
|
||||
|
||||
override fun onCreate() {
|
||||
super.onCreate()
|
||||
settingsPreferencesRepository = SettingsPreferencesRepository(dataStore)
|
||||
homeRepository = HomeRepository(applicationContext)
|
||||
lyricsRepository = LyricsRepository(applicationContext)
|
||||
lyricsRepository = LyricsRepository()
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user