-
Notifications
You must be signed in to change notification settings - Fork 5
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
Showing
51 changed files
with
323 additions
and
187 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
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
Submodule gn_mobile_core
updated
215 files
Submodule gn_mobile_maps
updated
41 files
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
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
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
33 changes: 33 additions & 0 deletions
33
occtax/src/main/java/fr/geonature/occtax/settings/AppSettingsModule.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 |
---|---|---|
@@ -0,0 +1,33 @@ | ||
package fr.geonature.occtax.settings | ||
|
||
import android.content.Context | ||
import dagger.Module | ||
import dagger.Provides | ||
import dagger.hilt.InstallIn | ||
import dagger.hilt.android.qualifiers.ApplicationContext | ||
import dagger.hilt.components.SingletonComponent | ||
import fr.geonature.commons.settings.AppSettingsManagerImpl | ||
import fr.geonature.commons.settings.IAppSettingsManager | ||
import fr.geonature.occtax.settings.io.OnAppSettingsJsonReaderListenerImpl | ||
import javax.inject.Singleton | ||
|
||
/** | ||
* Application settings module. | ||
* | ||
* @author S. Grimault | ||
*/ | ||
@Module | ||
@InstallIn(SingletonComponent::class) | ||
object AppSettingsModule { | ||
|
||
@Singleton | ||
@Provides | ||
fun provideAppSettingsManager( | ||
@ApplicationContext appContext: Context | ||
): IAppSettingsManager<AppSettings> { | ||
return AppSettingsManagerImpl( | ||
appContext, | ||
OnAppSettingsJsonReaderListenerImpl() | ||
) | ||
} | ||
} |
16 changes: 9 additions & 7 deletions
16
occtax/src/main/java/fr/geonature/occtax/settings/AppSettingsViewModel.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,15 +1,17 @@ | ||
package fr.geonature.occtax.settings | ||
|
||
import android.app.Application | ||
import dagger.hilt.android.lifecycle.HiltViewModel | ||
import fr.geonature.commons.settings.IAppSettingsManager | ||
import javax.inject.Inject | ||
import fr.geonature.commons.settings.AppSettingsViewModel as BaseAppSettingsViewModel | ||
import fr.geonature.occtax.settings.io.OnAppSettingsJsonReaderListenerImpl | ||
|
||
/** | ||
* [AppSettings] view model. | ||
* | ||
* @author [S. Grimault](mailto:sebastien.grimault@gmail.com) | ||
* @author S. Grimault | ||
*/ | ||
class AppSettingsViewModel(application: Application) : BaseAppSettingsViewModel<AppSettings>( | ||
application, | ||
OnAppSettingsJsonReaderListenerImpl() | ||
) | ||
@HiltViewModel | ||
class AppSettingsViewModel @Inject constructor(appSettingsManager: IAppSettingsManager<AppSettings>) : | ||
BaseAppSettingsViewModel<AppSettings>( | ||
appSettingsManager | ||
) |
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
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.