All Downloads are FREE. Search and download functionalities are using the official Maven repository.

androidMain.com.algolia.instantsearch.insights.internal.data.settings.InsightsEventSettings.kt Maven / Gradle / Ivy

Go to download

InstantSearch Android is a library providing widgets and helpers to help you build the best instant-search experience on Android with Algolia. It is built on top of Algolia's Kotlin API Client to provide you a high-level solution to quickly build various search interfaces.

There is a newer version: 3.3.1
Show newest version
package com.algolia.instantsearch.insights.internal.data.settings

import android.content.SharedPreferences
import com.algolia.instantsearch.insights.internal.extension.SharedPreferencesDelegate

internal class InsightsEventSettings(
    private val preferences: SharedPreferences,
) : InsightsSettings {

    private var SharedPreferences.jobId by SharedPreferencesDelegate.String()
    private var SharedPreferences.userToken by SharedPreferencesDelegate.String()

    override var workId: String?
        get() = preferences.jobId
        set(value) {
            preferences.jobId = value.toString()
        }

    override var userToken: String?
        get() = preferences.userToken
        set(value) {
            value?.let { preferences.userToken = it }
        }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy