-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Ui: Settings page, User agreement, Chat UI improvements, Dialogs (#179)
* - Seller reputation warning dialog * - User agreement * - agreementAccepted - Moved to Settings model from User model * - TakeOffer Review: Progress Dialog and Success Dialog * - Chat Improvements: Current time; Quoted message trim; Scroll to quoted message on click * - Settings screen UI 1/2 * - fetch i18n_codes from Bisq2.LanguageRepository (Coulndt find/No service) that wraps this Repository * - Settings screen UI 2/3 * - User Agreement flow uses settingsServiceFacade, rather than settingsRepository * - Settings - Backend integration 1 * - searchable dropdown for supported languages; useAnimations, tradeNotifications removed * - Multi select for Dropdown with Chip control * - langugeCode, supportedLanguages in androidNode * - Settings page - Remaining controls wired functionally in androidNode * - update languagePairs from LanguageServiceFacade, when app language changes * - TextField validation - Implemented in SettingsScreen * - Text field validation for TrustedNodeSetupScreen.RemoteBisqURL * - isInteractive handled in Scaffolds, to block the entire scaffold content with an invisible overlay box that consumes all clicks and interactions * - show PoW control only in androidNode; println, deadcode cleanup * - Settings Page functionality for xClients; With LanguageServiceFacade, LanguageAPIGateway (tested in androidClient) * - TextField validations 1/2 * - TextField validations 2/2 * - useAnimations - to be accompanied with changes in bisq2 repo * - Cleanup * - fix pod files references (bug from previous PR) + fix compilation issue on iOS with new useAnimation setting * - hiding new general settings as they need more work (agreed with buddha) --------- Co-authored-by: Rodrigo Varela <[email protected]>
- Loading branch information
1 parent
ebc6446
commit e882513
Showing
133 changed files
with
3,262 additions
and
546 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
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
20 changes: 20 additions & 0 deletions
20
...Main/kotlin/network/bisq/mobile/android/node/presentation/NodeGeneralSettingsPresenter.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,20 @@ | ||
package network.bisq.mobile.android.node.presentation | ||
|
||
import kotlinx.coroutines.flow.MutableStateFlow | ||
import kotlinx.coroutines.flow.StateFlow | ||
import network.bisq.mobile.domain.data.repository.SettingsRepository | ||
import network.bisq.mobile.domain.service.common.LanguageServiceFacade | ||
import network.bisq.mobile.domain.service.settings.SettingsServiceFacade | ||
import network.bisq.mobile.presentation.MainPresenter | ||
import network.bisq.mobile.presentation.ui.uicases.settings.GeneralSettingsPresenter | ||
|
||
class NodeGeneralSettingsPresenter( | ||
private val settingsRepository: SettingsRepository, | ||
private val settingsServiceFacade: SettingsServiceFacade, | ||
private val languageServiceFacade: LanguageServiceFacade, | ||
mainPresenter: MainPresenter | ||
) : GeneralSettingsPresenter(settingsRepository, settingsServiceFacade, languageServiceFacade, mainPresenter) { | ||
|
||
override val shouldShowPoWAdjustmentFactor: StateFlow<Boolean> = MutableStateFlow(true) | ||
|
||
} |
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
61 changes: 61 additions & 0 deletions
61
...dMain/kotlin/network/bisq/mobile/android/node/service/common/NodeLanguageServiceFacade.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,61 @@ | ||
package network.bisq.mobile.android.node.service.common | ||
|
||
import bisq.bonded_roles.market_price.MarketPriceService | ||
import bisq.common.locale.LanguageRepository | ||
import bisq.common.observable.Pin | ||
import bisq.presentation.formatters.PriceFormatter | ||
import kotlinx.coroutines.flow.MutableStateFlow | ||
import kotlinx.coroutines.flow.StateFlow | ||
import kotlinx.coroutines.flow.zip | ||
import network.bisq.mobile.android.node.AndroidApplicationService | ||
import network.bisq.mobile.android.node.mapping.Mappings | ||
import network.bisq.mobile.domain.data.model.MarketPriceItem | ||
import network.bisq.mobile.domain.formatters.MarketPriceFormatter | ||
import network.bisq.mobile.domain.service.common.LanguageServiceFacade | ||
import network.bisq.mobile.domain.service.market_price.MarketPriceServiceFacade | ||
import network.bisq.mobile.domain.utils.Logging | ||
|
||
class NodeLanguageServiceFacade(private val applicationService: AndroidApplicationService.Provider) : | ||
LanguageServiceFacade, Logging { | ||
|
||
// Dependencies | ||
private val languageService: LanguageRepository by lazy { | ||
applicationService.languageRepository.get() | ||
} | ||
|
||
// Properties | ||
private val _i18nPairs: MutableStateFlow<List<Pair<String, String>>> = MutableStateFlow(emptyList()) | ||
override val i18nPairs: StateFlow<List<Pair<String, String>>> = _i18nPairs | ||
|
||
private val _allPairs: MutableStateFlow<List<Pair<String, String>>> = MutableStateFlow(emptyList()) | ||
override val allPairs: StateFlow<List<Pair<String, String>>> = _allPairs | ||
|
||
override fun setDefaultLanguage(languageCode: String) { | ||
return LanguageRepository.setDefaultLanguage(languageCode) | ||
} | ||
|
||
// Life cycle | ||
override fun activate() { | ||
|
||
val displayTextList = mutableListOf<String>() | ||
for (code in LanguageRepository.I18N_CODES) { | ||
displayTextList.add(LanguageRepository.getDisplayString(code)) | ||
} | ||
_i18nPairs.value = LanguageRepository.I18N_CODES.zip(displayTextList) | ||
|
||
displayTextList.clear() | ||
for (code in LanguageRepository.CODES) { | ||
displayTextList.add(LanguageRepository.getDisplayString(code)) | ||
} | ||
_allPairs.value = LanguageRepository.CODES.zip(displayTextList) | ||
|
||
} | ||
|
||
override suspend fun sync() { | ||
activate() | ||
} | ||
|
||
override fun deactivate() { | ||
} | ||
|
||
} |
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.