Skip to content

Commit

Permalink
refactor: remove DataDirectoryChangeListener.Listener from `DataMan…
Browse files Browse the repository at this point in the history
…ager`
  • Loading branch information
goofyz committed Dec 30, 2023
1 parent 6c27171 commit b4151c4
Showing 1 changed file with 1 addition and 11 deletions.
12 changes: 1 addition & 11 deletions app/src/main/java/com/osfans/trime/data/DataManager.kt
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import com.osfans.trime.util.Const
import timber.log.Timber
import java.io.File

object DataManager : DataDirectoryChangeListener.Listener {
object DataManager {
private const val DEFAULT_CUSTOM_FILE_NAME = "default.custom.yaml"
private val prefs get() = AppPrefs.defaultInstance()

Expand All @@ -20,10 +20,6 @@ object DataManager : DataDirectoryChangeListener.Listener {
val userDataDir
get() = File(prefs.profile.userDataDir)

init {
DataDirectoryChangeListener.addDirectoryChangeListener(this)
}

sealed class Diff {
object New : Diff()

Expand Down Expand Up @@ -96,10 +92,4 @@ object DataManager : DataDirectoryChangeListener.Listener {

Timber.i("Synced!")
}

/**
* Update sharedDataDir and userDataDir.
*/
override fun onDataDirectoryChange() {
}
}

0 comments on commit b4151c4

Please sign in to comment.