2021-10-16 16:42:40 +02:00
|
|
|
import NimQml, os, strformat
|
2021-10-06 22:05:13 +02:00
|
|
|
|
2021-11-17 10:16:10 +01:00
|
|
|
import ../../app_service/service/os_notification/service as os_notification_service
|
2021-10-16 18:14:08 +02:00
|
|
|
import ../../app_service/service/keychain/service as keychain_service
|
2021-10-12 15:48:09 +02:00
|
|
|
import ../../app_service/service/accounts/service as accounts_service
|
2021-10-21 15:13:13 -04:00
|
|
|
import ../../app_service/service/contacts/service as contacts_service
|
2021-10-21 14:37:21 -04:00
|
|
|
import ../../app_service/service/language/service as language_service
|
2021-10-06 22:05:13 +02:00
|
|
|
import ../../app_service/service/chat/service as chat_service
|
|
|
|
import ../../app_service/service/community/service as community_service
|
2021-10-29 13:10:17 +02:00
|
|
|
import ../../app_service/service/message/service as message_service
|
2021-10-14 09:58:28 +02:00
|
|
|
import ../../app_service/service/token/service as token_service
|
2021-10-15 10:24:32 +02:00
|
|
|
import ../../app_service/service/transaction/service as transaction_service
|
2021-10-15 11:12:48 +02:00
|
|
|
import ../../app_service/service/collectible/service as collectible_service
|
2021-10-18 13:00:56 +02:00
|
|
|
import ../../app_service/service/wallet_account/service as wallet_account_service
|
2021-10-19 11:03:52 +02:00
|
|
|
import ../../app_service/service/setting/service as setting_service
|
2021-10-14 10:29:33 -04:00
|
|
|
import ../../app_service/service/bookmarks/service as bookmark_service
|
2021-10-21 10:46:24 -04:00
|
|
|
import ../../app_service/service/dapp_permissions/service as dapp_permissions_service
|
2021-10-21 18:31:41 -04:00
|
|
|
import ../../app_service/service/mnemonic/service as mnemonic_service
|
2021-10-22 14:26:11 -04:00
|
|
|
import ../../app_service/service/privacy/service as privacy_service
|
2021-10-26 10:36:31 -04:00
|
|
|
import ../../app_service/service/provider/service as provider_service
|
|
|
|
import ../../app_service/service/ens/service as ens_service
|
2021-10-14 09:58:28 +02:00
|
|
|
|
2021-10-16 21:54:00 +02:00
|
|
|
import ../core/local_account_settings
|
2021-10-13 17:31:04 -04:00
|
|
|
import ../../app_service/service/profile/service as profile_service
|
|
|
|
import ../../app_service/service/settings/service as settings_service
|
|
|
|
import ../../app_service/service/about/service as about_service
|
2021-10-29 13:10:17 +02:00
|
|
|
|
2021-10-06 22:05:13 +02:00
|
|
|
import ../modules/startup/module as startup_module
|
|
|
|
import ../modules/main/module as main_module
|
|
|
|
|
2021-11-16 14:49:51 +01:00
|
|
|
import ../global/local_account_settings
|
|
|
|
import ../global/global_singleton
|
2021-10-06 22:05:13 +02:00
|
|
|
|
2021-10-20 11:50:50 +02:00
|
|
|
#################################################
|
2021-10-12 15:48:09 +02:00
|
|
|
# This will be removed later once we move to c++ and handle there async things
|
|
|
|
# and improved some services, like EventsService which should implement
|
2021-10-20 11:50:50 +02:00
|
|
|
# provider/subscriber principe, similar we should have SettingsService.
|
2021-11-16 15:56:12 +01:00
|
|
|
import ../core/[main]
|
2021-10-16 18:14:08 +02:00
|
|
|
import eventemitter
|
2021-10-29 19:27:14 +02:00
|
|
|
import status/[fleet]
|
2021-10-16 16:42:40 +02:00
|
|
|
import ../profile/core as profile
|
2021-10-20 11:50:50 +02:00
|
|
|
import status/types/[account, setting]
|
2021-10-16 16:42:40 +02:00
|
|
|
#################################################
|
|
|
|
|
|
|
|
|
|
|
|
var i18nPath = ""
|
|
|
|
if defined(development):
|
|
|
|
i18nPath = joinPath(getAppDir(), "../ui/i18n")
|
|
|
|
elif (defined(windows)):
|
|
|
|
i18nPath = joinPath(getAppDir(), "../resources/i18n")
|
|
|
|
elif (defined(macosx)):
|
|
|
|
i18nPath = joinPath(getAppDir(), "../i18n")
|
|
|
|
elif (defined(linux)):
|
|
|
|
i18nPath = joinPath(getAppDir(), "../i18n")
|
|
|
|
|
2021-10-20 12:55:10 +02:00
|
|
|
proc setLanguage(locale: string) =
|
|
|
|
let shouldRetranslate = not defined(linux)
|
|
|
|
singletonInstance.engine.setTranslationPackage(joinPath(i18nPath, fmt"qml_{locale}.qm"), shouldRetranslate)
|
|
|
|
|
2021-10-16 16:42:40 +02:00
|
|
|
proc changeLanguage(locale: string) =
|
2021-10-20 12:55:10 +02:00
|
|
|
let currentLanguageCode = singletonInstance.localAppSettings.getLocale()
|
2021-10-16 16:42:40 +02:00
|
|
|
if (locale == currentLanguageCode):
|
|
|
|
return
|
2021-10-20 12:55:10 +02:00
|
|
|
|
|
|
|
singletonInstance.localAppSettings.setLocale(locale)
|
|
|
|
setLanguage(locale)
|
2021-10-06 22:05:13 +02:00
|
|
|
|
|
|
|
type
|
|
|
|
AppController* = ref object of RootObj
|
2021-10-12 15:48:09 +02:00
|
|
|
appService: AppService
|
2021-10-06 22:05:13 +02:00
|
|
|
# Services
|
2021-11-17 10:16:10 +01:00
|
|
|
osNotificationService: os_notification_service.Service
|
2021-10-16 18:14:08 +02:00
|
|
|
keychainService: keychain_service.Service
|
2021-10-12 15:48:09 +02:00
|
|
|
accountsService: accounts_service.Service
|
2021-10-21 15:13:13 -04:00
|
|
|
contactsService: contacts_service.Service
|
2021-10-06 22:05:13 +02:00
|
|
|
chatService: chat_service.Service
|
|
|
|
communityService: community_service.Service
|
2021-10-29 13:10:17 +02:00
|
|
|
messageService: message_service.Service
|
2021-10-14 09:58:28 +02:00
|
|
|
tokenService: token_service.Service
|
2021-10-15 10:24:32 +02:00
|
|
|
transactionService: transaction_service.Service
|
2021-10-15 11:12:48 +02:00
|
|
|
collectibleService: collectible_service.Service
|
2021-10-18 13:00:56 +02:00
|
|
|
walletAccountService: wallet_account_service.Service
|
2021-10-19 11:03:52 +02:00
|
|
|
settingService: setting_service.Service
|
2021-10-14 10:29:33 -04:00
|
|
|
bookmarkService: bookmark_service.Service
|
2021-10-21 10:46:24 -04:00
|
|
|
dappPermissionsService: dapp_permissions_service.Service
|
2021-10-26 10:36:31 -04:00
|
|
|
ensService: ens_service.Service
|
|
|
|
providerService: provider_service.Service
|
2021-10-13 17:31:04 -04:00
|
|
|
profileService: profile_service.Service
|
|
|
|
settingsService: settings_service.Service
|
|
|
|
aboutService: about_service.Service
|
2021-10-21 14:37:21 -04:00
|
|
|
languageService: language_service.Service
|
2021-10-21 18:31:41 -04:00
|
|
|
mnemonicService: mnemonic_service.Service
|
2021-10-22 14:26:11 -04:00
|
|
|
privacyService: privacy_service.Service
|
2021-10-20 11:50:50 +02:00
|
|
|
|
|
|
|
# Core
|
2021-10-20 12:55:10 +02:00
|
|
|
localAppSettingsVariant: QVariant
|
2021-10-20 11:50:50 +02:00
|
|
|
localAccountSettingsVariant: QVariant
|
|
|
|
localAccountSensitiveSettingsVariant: QVariant
|
2021-10-29 19:27:14 +02:00
|
|
|
userProfileVariant: QVariant
|
2021-10-20 11:50:50 +02:00
|
|
|
|
2021-10-13 17:31:04 -04:00
|
|
|
# Modules
|
2021-10-19 09:19:03 +02:00
|
|
|
startupModule: startup_module.AccessInterface
|
2021-10-13 17:31:04 -04:00
|
|
|
mainModule: main_module.AccessInterface
|
2021-10-06 22:05:13 +02:00
|
|
|
|
2021-10-16 16:42:40 +02:00
|
|
|
#################################################
|
|
|
|
# At the end of refactoring this will be moved to
|
|
|
|
# appropriate place or removed:
|
|
|
|
profile: ProfileController
|
|
|
|
#################################################
|
2021-10-06 22:05:13 +02:00
|
|
|
|
|
|
|
#################################################
|
|
|
|
# Forward declaration section
|
2021-10-29 19:27:14 +02:00
|
|
|
proc load(self: AppController)
|
|
|
|
proc buildAndRegisterLocalAccountSensitiveSettings(self: AppController)
|
|
|
|
proc buildAndRegisterUserProfile(self: AppController)
|
2021-10-06 22:05:13 +02:00
|
|
|
|
|
|
|
# Startup Module Delegate Interface
|
|
|
|
proc startupDidLoad*(self: AppController)
|
2021-10-15 21:47:43 +02:00
|
|
|
proc userLoggedIn*(self: AppController)
|
2021-10-06 22:05:13 +02:00
|
|
|
|
|
|
|
# Main Module Delegate Interface
|
|
|
|
proc mainDidLoad*(self: AppController)
|
|
|
|
#################################################
|
|
|
|
|
2021-10-16 16:42:40 +02:00
|
|
|
#################################################
|
|
|
|
# At the end of refactoring this will be moved to
|
|
|
|
# appropriate place or removed:
|
|
|
|
proc connect(self: AppController) =
|
|
|
|
self.appService.status.events.once("loginCompleted") do(a: Args):
|
|
|
|
var args = AccountArgs(a)
|
|
|
|
self.profile.init(args.account)
|
|
|
|
#################################################
|
2021-10-06 22:05:13 +02:00
|
|
|
|
2021-10-12 15:48:09 +02:00
|
|
|
proc newAppController*(appService: AppService): AppController =
|
2021-10-06 22:05:13 +02:00
|
|
|
result = AppController()
|
2021-10-12 15:48:09 +02:00
|
|
|
result.appService = appService
|
2021-10-06 22:05:13 +02:00
|
|
|
# Services
|
2021-11-17 10:16:10 +01:00
|
|
|
result.osNotificationService = os_notification_service.newService(appService.status.events)
|
2021-10-18 10:21:59 +02:00
|
|
|
result.keychainService = keychain_service.newService(appService.status.events)
|
2021-10-19 12:58:35 +02:00
|
|
|
result.settingService = setting_service.newService()
|
2021-11-09 14:40:09 -05:00
|
|
|
result.settingsService = settings_service.newService()
|
2021-10-12 15:48:09 +02:00
|
|
|
result.accountsService = accounts_service.newService()
|
2021-11-01 12:04:00 -04:00
|
|
|
result.contactsService = contacts_service.newService(appService.status.events, appService.threadpool)
|
2021-11-09 18:43:38 +01:00
|
|
|
result.chatService = chat_service.newService(result.contactsService)
|
2021-10-18 12:07:18 +02:00
|
|
|
result.communityService = community_service.newService(result.chatService)
|
2021-10-29 13:10:17 +02:00
|
|
|
result.messageService = message_service.newService(appService.status.events, appService.threadpool)
|
|
|
|
result.tokenService = token_service.newService(appService.status.events, appService.threadpool, result.settingService,
|
|
|
|
result.settingsService)
|
2021-10-21 10:22:05 +02:00
|
|
|
result.collectibleService = collectible_service.newService(result.settingService)
|
2021-10-29 13:10:17 +02:00
|
|
|
result.walletAccountService = wallet_account_service.newService(appService.status.events, result.settingService,
|
|
|
|
result.tokenService)
|
|
|
|
result.transactionService = transaction_service.newService(appService.status.events, appService.threadpool,
|
|
|
|
result.walletAccountService)
|
2021-10-14 10:29:33 -04:00
|
|
|
result.bookmarkService = bookmark_service.newService()
|
2021-10-13 17:31:04 -04:00
|
|
|
result.profileService = profile_service.newService()
|
|
|
|
result.aboutService = about_service.newService()
|
2021-10-21 10:46:24 -04:00
|
|
|
result.dappPermissionsService = dapp_permissions_service.newService()
|
2021-10-21 14:37:21 -04:00
|
|
|
result.languageService = language_service.newService()
|
2021-10-21 18:31:41 -04:00
|
|
|
result.mnemonicService = mnemonic_service.newService()
|
2021-10-22 14:26:11 -04:00
|
|
|
result.privacyService = privacy_service.newService()
|
2021-10-26 10:36:31 -04:00
|
|
|
result.ensService = ens_service.newService()
|
|
|
|
result.providerService = provider_service.newService(result.dappPermissionsService, result.settingsService, result.ensService)
|
2021-10-14 09:58:28 +02:00
|
|
|
|
2021-10-16 21:54:00 +02:00
|
|
|
# Core
|
2021-10-20 12:55:10 +02:00
|
|
|
result.localAppSettingsVariant = newQVariant(singletonInstance.localAppSettings)
|
2021-10-20 11:50:50 +02:00
|
|
|
result.localAccountSettingsVariant = newQVariant(singletonInstance.localAccountSettings)
|
|
|
|
result.localAccountSensitiveSettingsVariant = newQVariant(singletonInstance.localAccountSensitiveSettings)
|
2021-10-29 19:27:14 +02:00
|
|
|
result.userProfileVariant = newQVariant(singletonInstance.userProfile)
|
|
|
|
|
2021-10-06 22:05:13 +02:00
|
|
|
# Modules
|
2021-10-19 09:19:03 +02:00
|
|
|
result.startupModule = startup_module.newModule[AppController](
|
|
|
|
result,
|
|
|
|
appService.status.events,
|
|
|
|
appService.status.fleet,
|
|
|
|
result.keychainService,
|
|
|
|
result.accountsService
|
|
|
|
)
|
2021-10-15 10:24:32 +02:00
|
|
|
result.mainModule = main_module.newModule[AppController](
|
|
|
|
result,
|
|
|
|
appService.status.events,
|
|
|
|
result.keychainService,
|
|
|
|
result.accountsService,
|
|
|
|
result.chatService,
|
|
|
|
result.communityService,
|
2021-10-29 13:10:17 +02:00
|
|
|
result.messageService,
|
2021-10-15 10:24:32 +02:00
|
|
|
result.tokenService,
|
2021-10-15 11:12:48 +02:00
|
|
|
result.transactionService,
|
2021-10-18 13:00:56 +02:00
|
|
|
result.collectibleService,
|
2021-10-19 11:03:52 +02:00
|
|
|
result.walletAccountService,
|
2021-10-14 10:29:33 -04:00
|
|
|
result.bookmarkService,
|
2021-10-13 17:31:04 -04:00
|
|
|
result.settingService,
|
|
|
|
result.profileService,
|
|
|
|
result.settingsService,
|
2021-10-21 15:13:13 -04:00
|
|
|
result.contactsService,
|
2021-10-13 17:31:04 -04:00
|
|
|
result.aboutService,
|
2021-10-21 10:46:24 -04:00
|
|
|
result.dappPermissionsService,
|
2021-10-21 18:31:41 -04:00
|
|
|
result.languageService,
|
2021-10-22 14:26:11 -04:00
|
|
|
result.mnemonicService,
|
2021-10-26 10:36:31 -04:00
|
|
|
result.privacyService,
|
|
|
|
result.providerService,
|
2021-10-15 10:24:32 +02:00
|
|
|
)
|
2021-10-06 22:05:13 +02:00
|
|
|
|
2021-10-16 16:42:40 +02:00
|
|
|
#################################################
|
|
|
|
# At the end of refactoring this will be moved to
|
|
|
|
# appropriate place or removed:
|
2021-10-20 13:06:29 +02:00
|
|
|
result.profile = profile.newController(appService.status, appService, changeLanguage)
|
2021-10-16 16:42:40 +02:00
|
|
|
result.connect()
|
|
|
|
#################################################
|
2021-10-06 22:05:13 +02:00
|
|
|
|
2021-10-13 17:31:04 -04:00
|
|
|
# Adding status and appService here now is just because of having a controll
|
|
|
|
# over order of execution while we integrating this refactoring architecture
|
|
|
|
# into the current app state.
|
|
|
|
# Once we complete refactoring process we will get rid of "status" part/lib.
|
|
|
|
#
|
|
|
|
# This to will be adapted to appropriate modules later:
|
|
|
|
# result.login = login.newController(appService.status, appService)
|
|
|
|
# result.onboarding = onboarding.newController(appService.status)
|
|
|
|
# singletonInstance.engine.setRootContextProperty("loginModel", result.login.variant)
|
|
|
|
# singletonInstance.engine.setRootContextProperty("onboardingModel", result.onboarding.variant)
|
|
|
|
#result.connect()
|
|
|
|
|
2021-10-06 22:05:13 +02:00
|
|
|
proc delete*(self: AppController) =
|
2021-11-17 10:16:10 +01:00
|
|
|
self.osNotificationService.delete
|
2021-10-21 15:13:13 -04:00
|
|
|
self.contactsService.delete
|
2021-10-14 10:29:33 -04:00
|
|
|
self.chatService.delete
|
|
|
|
self.communityService.delete
|
|
|
|
self.bookmarkService.delete
|
2021-10-06 22:05:13 +02:00
|
|
|
self.startupModule.delete
|
|
|
|
self.mainModule.delete
|
2021-10-16 16:42:40 +02:00
|
|
|
|
|
|
|
#################################################
|
|
|
|
# At the end of refactoring this will be moved to
|
|
|
|
# appropriate place or removed:
|
|
|
|
self.profile.delete
|
|
|
|
#################################################
|
2021-10-12 15:48:09 +02:00
|
|
|
|
2021-10-20 12:55:10 +02:00
|
|
|
self.localAppSettingsVariant.delete
|
2021-10-16 21:54:00 +02:00
|
|
|
self.localAccountSettingsVariant.delete
|
2021-10-20 11:50:50 +02:00
|
|
|
self.localAccountSensitiveSettingsVariant.delete
|
2021-10-29 19:27:14 +02:00
|
|
|
self.userProfileVariant.delete
|
2021-10-16 21:54:00 +02:00
|
|
|
|
2021-10-12 15:48:09 +02:00
|
|
|
self.accountsService.delete
|
|
|
|
self.chatService.delete
|
|
|
|
self.communityService.delete
|
2021-10-19 09:19:03 +02:00
|
|
|
self.tokenService.delete
|
|
|
|
self.transactionService.delete
|
|
|
|
self.collectibleService.delete
|
2021-10-19 12:58:35 +02:00
|
|
|
self.settingService.delete
|
2021-10-19 09:19:03 +02:00
|
|
|
self.walletAccountService.delete
|
2021-10-13 17:31:04 -04:00
|
|
|
self.aboutService.delete
|
2021-10-21 10:46:24 -04:00
|
|
|
self.dappPermissionsService.delete
|
2021-10-26 10:36:31 -04:00
|
|
|
self.providerService.delete
|
|
|
|
self.ensService.delete
|
2021-10-06 22:05:13 +02:00
|
|
|
|
|
|
|
proc startupDidLoad*(self: AppController) =
|
2021-10-16 16:42:40 +02:00
|
|
|
#################################################
|
|
|
|
# At the end of refactoring this will be moved to
|
|
|
|
# appropriate place or removed:
|
|
|
|
singletonInstance.engine.setRootContextProperty("profileModel", self.profile.variant)
|
|
|
|
#################################################
|
|
|
|
|
2021-10-20 12:55:10 +02:00
|
|
|
singletonInstance.engine.setRootContextProperty("localAppSettings", self.localAppSettingsVariant)
|
2021-10-20 11:50:50 +02:00
|
|
|
singletonInstance.engine.setRootContextProperty("localAccountSettings", self.localAccountSettingsVariant)
|
2021-10-16 16:42:40 +02:00
|
|
|
singletonInstance.engine.load(newQUrl("qrc:///main.qml"))
|
2021-10-06 22:05:13 +02:00
|
|
|
|
2021-10-20 12:55:10 +02:00
|
|
|
# We need to set a language once qml is loaded
|
|
|
|
let locale = singletonInstance.localAppSettings.getLocale()
|
|
|
|
setLanguage(locale)
|
|
|
|
|
2021-10-06 22:05:13 +02:00
|
|
|
proc mainDidLoad*(self: AppController) =
|
|
|
|
self.appService.onLoggedIn()
|
2021-10-14 10:04:15 +02:00
|
|
|
self.startupModule.moveToAppState()
|
2021-10-06 22:05:13 +02:00
|
|
|
|
2021-10-16 21:03:01 +02:00
|
|
|
self.mainModule.checkForStoringPassword()
|
|
|
|
|
2021-10-06 22:05:13 +02:00
|
|
|
proc start*(self: AppController) =
|
2021-10-12 15:48:09 +02:00
|
|
|
self.accountsService.init()
|
|
|
|
|
|
|
|
self.startupModule.load()
|
2021-10-06 22:05:13 +02:00
|
|
|
|
2021-10-29 19:27:14 +02:00
|
|
|
proc load(self: AppController) =
|
|
|
|
# init services which are available only if a user is logged in
|
2021-10-19 12:58:35 +02:00
|
|
|
self.settingService.init()
|
2021-10-21 15:13:13 -04:00
|
|
|
self.contactsService.init()
|
2021-10-06 22:05:13 +02:00
|
|
|
self.chatService.init()
|
|
|
|
self.communityService.init()
|
2021-10-14 10:29:33 -04:00
|
|
|
self.bookmarkService.init()
|
2021-10-14 09:58:28 +02:00
|
|
|
self.tokenService.init()
|
2021-10-22 16:31:25 -04:00
|
|
|
self.settingsService.init()
|
2021-10-21 10:46:24 -04:00
|
|
|
self.dappPermissionsService.init()
|
2021-10-26 10:36:31 -04:00
|
|
|
self.ensService.init()
|
|
|
|
self.providerService.init()
|
2021-10-18 13:00:56 +02:00
|
|
|
self.walletAccountService.init()
|
2021-10-20 10:02:17 +02:00
|
|
|
self.transactionService.init()
|
2021-11-18 15:41:51 +01:00
|
|
|
self.languageService.init()
|
2021-10-29 19:27:14 +02:00
|
|
|
|
|
|
|
# other global instances
|
|
|
|
self.buildAndRegisterLocalAccountSensitiveSettings()
|
|
|
|
self.buildAndRegisterUserProfile()
|
|
|
|
|
|
|
|
# load main module
|
2021-10-29 13:10:17 +02:00
|
|
|
self.mainModule.load(self.appService.status.events, self.chatService, self.communityService, self.messageService)
|
2021-10-14 10:04:15 +02:00
|
|
|
|
2021-10-15 21:47:43 +02:00
|
|
|
proc userLoggedIn*(self: AppController) =
|
2021-10-19 16:22:49 +02:00
|
|
|
#################################################
|
|
|
|
# At the end of refactoring this will be removed:
|
|
|
|
let loggedInUser = self.accountsService.getLoggedInAccount()
|
|
|
|
let account = Account(name: loggedInUser.name, keyUid: loggedInUser.keyUid)
|
|
|
|
self.appService.status.events.emit("loginCompleted", AccountArgs(account: account))
|
|
|
|
#################################################
|
2021-10-14 10:29:33 -04:00
|
|
|
self.load()
|
2021-10-29 19:27:14 +02:00
|
|
|
|
|
|
|
proc buildAndRegisterLocalAccountSensitiveSettings(self: AppController) =
|
|
|
|
var pubKey = self.settingsService.getPubKey()
|
|
|
|
singletonInstance.localAccountSensitiveSettings.setFileName(pubKey)
|
|
|
|
singletonInstance.engine.setRootContextProperty("localAccountSensitiveSettings", self.localAccountSensitiveSettingsVariant)
|
|
|
|
|
|
|
|
proc buildAndRegisterUserProfile(self: AppController) =
|
|
|
|
let loggedInAccount = self.accountsService.getLoggedInAccount()
|
|
|
|
|
|
|
|
let pubKey = self.settingsService.getPubKey()
|
|
|
|
let sendUserStatus = self.settingsService.getSendUserStatus()
|
2021-11-22 12:08:09 +01:00
|
|
|
## This is still not in use. Read a comment in UserProfile.
|
|
|
|
## let currentUserStatus = self.settingsService.getCurrentUserStatus()
|
2021-10-29 19:27:14 +02:00
|
|
|
let obj = self.settingsService.getIdentityImage(loggedInAccount.keyUid)
|
|
|
|
|
|
|
|
singletonInstance.userProfile.setFixedData(loggedInAccount.name, loggedInAccount.keyUid, loggedInAccount.identicon,
|
|
|
|
pubKey)
|
|
|
|
singletonInstance.userProfile.setEnsName("") # in this moment we don't know ens name
|
|
|
|
singletonInstance.userProfile.setThumbnailImage(obj.thumbnail)
|
|
|
|
singletonInstance.userProfile.setLargeImage(obj.large)
|
2021-11-22 12:08:09 +01:00
|
|
|
singletonInstance.userProfile.setUserStatus(sendUserStatus)
|
2021-10-29 19:27:14 +02:00
|
|
|
|
2021-11-18 15:41:51 +01:00
|
|
|
singletonInstance.engine.setRootContextProperty("userProfile", self.userProfileVariant)
|