-
Notifications
You must be signed in to change notification settings - Fork 86
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
eb730b5
commit 5b71dd2
Showing
20 changed files
with
446 additions
and
376 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
22 changes: 22 additions & 0 deletions
22
app/src/main/java/de/baumann/browser/EinkBroApplication.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,34 @@ | ||
package de.baumann.browser | ||
|
||
import android.app.Application | ||
import android.content.SharedPreferences | ||
import androidx.appcompat.app.AppCompatDelegate | ||
import androidx.preference.PreferenceManager | ||
import de.baumann.browser.database.BookmarkManager | ||
import de.baumann.browser.epub.EpubManager | ||
import de.baumann.browser.preference.ConfigManager | ||
import de.baumann.browser.view.dialog.DialogManager | ||
import org.koin.android.ext.koin.androidContext | ||
import org.koin.core.context.GlobalContext.startKoin | ||
import org.koin.dsl.module | ||
|
||
class EinkBroApplication : Application() { | ||
|
||
override fun onCreate() { | ||
super.onCreate() | ||
AppCompatDelegate.setDefaultNightMode(AppCompatDelegate.MODE_NIGHT_FOLLOW_SYSTEM) | ||
startKoin { | ||
androidContext(this@EinkBroApplication) | ||
modules(myModule) | ||
} | ||
} | ||
} | ||
|
||
val myModule = module { | ||
single { ConfigManager(androidContext()) } | ||
single { PreferenceManager.getDefaultSharedPreferences(androidContext()) } | ||
single { BookmarkManager(androidContext()) } | ||
|
||
single { DialogManager(it[0]) } | ||
single { EpubManager(it[0]) } | ||
} |
138 changes: 73 additions & 65 deletions
138
app/src/main/java/de/baumann/browser/activity/BrowserActivity.kt
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.