mirror of
https://github.com/kiwix/kiwix-android.git
synced 2025-09-08 06:42:21 -04:00
Merge branch 'develop' of https://github.com/kiwix/kiwix-android into feature/navigation
This commit is contained in:
commit
f23fdfbbc8
@ -34,19 +34,16 @@ import org.kiwix.kiwixmobile.zim_manager.MountPointProducer
|
|||||||
object KiwixModule {
|
object KiwixModule {
|
||||||
@Provides
|
@Provides
|
||||||
@KiwixScope
|
@KiwixScope
|
||||||
@JvmStatic
|
|
||||||
internal fun provideLocationManager(context: Context): LocationManager =
|
internal fun provideLocationManager(context: Context): LocationManager =
|
||||||
context.getSystemService(Context.LOCATION_SERVICE) as LocationManager
|
context.getSystemService(Context.LOCATION_SERVICE) as LocationManager
|
||||||
|
|
||||||
@Provides
|
@Provides
|
||||||
@KiwixScope
|
@KiwixScope
|
||||||
@JvmStatic
|
|
||||||
fun provideWifiManager(context: Context): WifiManager =
|
fun provideWifiManager(context: Context): WifiManager =
|
||||||
context.applicationContext.getSystemService(Context.WIFI_SERVICE) as WifiManager
|
context.applicationContext.getSystemService(Context.WIFI_SERVICE) as WifiManager
|
||||||
|
|
||||||
@Provides
|
@Provides
|
||||||
@KiwixScope
|
@KiwixScope
|
||||||
@JvmStatic
|
|
||||||
internal fun provideFat32Checker(
|
internal fun provideFat32Checker(
|
||||||
sharedPreferenceUtil: SharedPreferenceUtil,
|
sharedPreferenceUtil: SharedPreferenceUtil,
|
||||||
mountPointProducer: MountPointProducer
|
mountPointProducer: MountPointProducer
|
||||||
|
@ -19,15 +19,15 @@ object Versions {
|
|||||||
|
|
||||||
const val org_jetbrains_kotlin: String = "1.3.72"
|
const val org_jetbrains_kotlin: String = "1.3.72"
|
||||||
|
|
||||||
const val com_google_dagger: String = "2.26" // available: "2.28.3"
|
const val com_google_dagger: String = "2.28.3"
|
||||||
|
|
||||||
const val com_yahoo_squidb: String = "2.0.0" // available: "3.2.3"
|
const val com_yahoo_squidb: String = "2.0.0" // available: "3.2.3"
|
||||||
|
|
||||||
const val com_jakewharton: String = "10.2.1" // available: "10.2.2"
|
const val com_jakewharton: String = "10.2.2"
|
||||||
|
|
||||||
const val androidx_test: String = "1.2.0"
|
const val androidx_test: String = "1.2.0"
|
||||||
|
|
||||||
const val io_objectbox: String = "2.6.0" // available: "2.7.0"
|
const val io_objectbox: String = "2.7.0"
|
||||||
|
|
||||||
const val org_jacoco: String = "0.7.9"
|
const val org_jacoco: String = "0.7.9"
|
||||||
|
|
||||||
@ -81,11 +81,11 @@ object Versions {
|
|||||||
|
|
||||||
const val rxandroid: String = "2.1.1"
|
const val rxandroid: String = "2.1.1"
|
||||||
|
|
||||||
const val core_ktx: String = "1.3.0" // available: "1.3.1"
|
const val core_ktx: String = "1.3.1"
|
||||||
|
|
||||||
const val kiwixlib: String = "9.2.3" // available: "9.3.1"
|
const val kiwixlib: String = "9.3.1"
|
||||||
|
|
||||||
const val material: String = "1.1.0" // available: "1.2.0"
|
const val material: String = "1.2.0"
|
||||||
|
|
||||||
const val multidex: String = "2.0.1"
|
const val multidex: String = "2.0.1"
|
||||||
|
|
||||||
@ -95,7 +95,7 @@ object Versions {
|
|||||||
|
|
||||||
const val jsr305: String = "3.0.2"
|
const val jsr305: String = "3.0.2"
|
||||||
|
|
||||||
const val ktlint: String = "0.36.0" // available: "0.37.2"
|
const val ktlint: String = "0.37.2"
|
||||||
|
|
||||||
const val rxjava: String = "2.2.19"
|
const val rxjava: String = "2.2.19"
|
||||||
|
|
||||||
|
@ -39,15 +39,12 @@ abstract class ActivityModule {
|
|||||||
@ActivityScope
|
@ActivityScope
|
||||||
abstract fun bindDialogShower(alertDialogShower: AlertDialogShower): DialogShower
|
abstract fun bindDialogShower(alertDialogShower: AlertDialogShower): DialogShower
|
||||||
|
|
||||||
@Module
|
|
||||||
companion object {
|
companion object {
|
||||||
@JvmStatic
|
|
||||||
@Provides
|
@Provides
|
||||||
@ActivityScope
|
@ActivityScope
|
||||||
fun providesMainPresenter(dataSource: DataSource): MainRepositoryActions =
|
fun providesMainPresenter(dataSource: DataSource): MainRepositoryActions =
|
||||||
MainRepositoryActions(dataSource)
|
MainRepositoryActions(dataSource)
|
||||||
|
|
||||||
@JvmStatic
|
|
||||||
@Provides
|
@Provides
|
||||||
@ActivityScope
|
@ActivityScope
|
||||||
fun providesMainMenuFactory(activity: Activity, zimReaderContainer: ZimReaderContainer):
|
fun providesMainMenuFactory(activity: Activity, zimReaderContainer: ZimReaderContainer):
|
||||||
|
@ -39,7 +39,6 @@ import javax.inject.Singleton
|
|||||||
|
|
||||||
@Module
|
@Module
|
||||||
object DownloaderModule {
|
object DownloaderModule {
|
||||||
@JvmStatic
|
|
||||||
@Provides
|
@Provides
|
||||||
@Singleton
|
@Singleton
|
||||||
fun providesDownloader(
|
fun providesDownloader(
|
||||||
@ -48,19 +47,16 @@ object DownloaderModule {
|
|||||||
kiwixService: KiwixService
|
kiwixService: KiwixService
|
||||||
): Downloader = DownloaderImpl(downloadRequester, downloadDao, kiwixService)
|
): Downloader = DownloaderImpl(downloadRequester, downloadDao, kiwixService)
|
||||||
|
|
||||||
@JvmStatic
|
|
||||||
@Provides
|
@Provides
|
||||||
@Singleton
|
@Singleton
|
||||||
fun providesDownloadRequester(fetch: Fetch, sharedPreferenceUtil: SharedPreferenceUtil):
|
fun providesDownloadRequester(fetch: Fetch, sharedPreferenceUtil: SharedPreferenceUtil):
|
||||||
DownloadRequester = FetchDownloadRequester(fetch, sharedPreferenceUtil)
|
DownloadRequester = FetchDownloadRequester(fetch, sharedPreferenceUtil)
|
||||||
|
|
||||||
@JvmStatic
|
|
||||||
@Provides
|
@Provides
|
||||||
@Singleton
|
@Singleton
|
||||||
fun provideFetch(fetchConfiguration: FetchConfiguration): Fetch =
|
fun provideFetch(fetchConfiguration: FetchConfiguration): Fetch =
|
||||||
Fetch.getInstance(fetchConfiguration)
|
Fetch.getInstance(fetchConfiguration)
|
||||||
|
|
||||||
@JvmStatic
|
|
||||||
@Provides
|
@Provides
|
||||||
@Singleton
|
@Singleton
|
||||||
fun provideFetchConfiguration(
|
fun provideFetchConfiguration(
|
||||||
@ -77,7 +73,6 @@ object DownloaderModule {
|
|||||||
setNotificationManager(fetchNotificationManager)
|
setNotificationManager(fetchNotificationManager)
|
||||||
}.build().also(Impl::setDefaultInstanceConfiguration)
|
}.build().also(Impl::setDefaultInstanceConfiguration)
|
||||||
|
|
||||||
@JvmStatic
|
|
||||||
@Provides
|
@Provides
|
||||||
@Singleton
|
@Singleton
|
||||||
fun provideOkHttpDownloader() = OkHttpDownloader(
|
fun provideOkHttpDownloader() = OkHttpDownloader(
|
||||||
@ -87,7 +82,6 @@ object DownloaderModule {
|
|||||||
.build()
|
.build()
|
||||||
)
|
)
|
||||||
|
|
||||||
@JvmStatic
|
|
||||||
@Provides
|
@Provides
|
||||||
@Singleton
|
@Singleton
|
||||||
fun provideFetchDownloadNotificationManager(context: Context):
|
fun provideFetchDownloadNotificationManager(context: Context):
|
||||||
|
25
core/src/main/res/drawable-night/ic_open_in_new_24dp.xml
Normal file
25
core/src/main/res/drawable-night/ic_open_in_new_24dp.xml
Normal file
@ -0,0 +1,25 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<!--
|
||||||
|
~ Kiwix Android
|
||||||
|
~ Copyright (c) 2020 Kiwix <android.kiwix.org>
|
||||||
|
~ This program is free software: you can redistribute it and/or modify
|
||||||
|
~ it under the terms of the GNU General Public License as published by
|
||||||
|
~ the Free Software Foundation, either version 3 of the License, or
|
||||||
|
~ (at your option) any later version.
|
||||||
|
~
|
||||||
|
~ This program is distributed in the hope that it will be useful,
|
||||||
|
~ but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
~ GNU General Public License for more details.
|
||||||
|
~
|
||||||
|
~ You should have received a copy of the GNU General Public License
|
||||||
|
~ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
~
|
||||||
|
-->
|
||||||
|
|
||||||
|
<vector xmlns:tools="http://schemas.android.com/tools"
|
||||||
|
android:height="24dp"
|
||||||
|
android:viewportHeight="24" android:viewportWidth="24"
|
||||||
|
android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
|
<path android:fillColor="#AAAAAA" android:pathData="M19,19H5V5h7V3H5c-1.11,0 -2,0.9 -2,2v14c0,1.1 0.89,2 2,2h14c1.1,0 2,-0.9 2,-2v-7h-2v7zM14,3v2h3.59l-9.83,9.83 1.41,1.41L19,6.41V10h2V3h-7z" />
|
||||||
|
</vector>
|
@ -16,8 +16,9 @@
|
|||||||
~
|
~
|
||||||
-->
|
-->
|
||||||
|
|
||||||
<vector android:height="24dp"
|
<vector xmlns:tools="http://schemas.android.com/tools"
|
||||||
|
android:height="24dp"
|
||||||
android:viewportHeight="24" android:viewportWidth="24"
|
android:viewportHeight="24" android:viewportWidth="24"
|
||||||
android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
|
android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
<path android:fillColor="#565656" android:pathData="M19,19H5V5h7V3H5c-1.11,0 -2,0.9 -2,2v14c0,1.1 0.89,2 2,2h14c1.1,0 2,-0.9 2,-2v-7h-2v7zM14,3v2h3.59l-9.83,9.83 1.41,1.41L19,6.41V10h2V3h-7z"/>
|
<path android:fillColor="#565656" android:pathData="M19,19H5V5h7V3H5c-1.11,0 -2,0.9 -2,2v14c0,1.1 0.89,2 2,2h14c1.1,0 2,-0.9 2,-2v-7h-2v7zM14,3v2h3.59l-9.83,9.83 1.41,1.41L19,6.41V10h2V3h-7z" />
|
||||||
</vector>
|
</vector>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user