Change to the current `profileModule`

This commit is contained in:
Sale Djenic 2021-10-29 20:29:38 +02:00 committed by Jakub
parent cc5ccbc951
commit f27a3cc8dc
1 changed files with 13 additions and 14 deletions

View File

@ -1,4 +1,6 @@
import ./controller_interface import ./controller_interface
import ../../../../core/global_singleton
import ../../../../../app_service/service/profile/service as profile_service import ../../../../../app_service/service/profile/service as profile_service
import ../../../../../app_service/service/accounts/service as accounts_service import ../../../../../app_service/service/accounts/service as accounts_service
import ../../../../../app_service/service/settings/service as settings_service import ../../../../../app_service/service/settings/service as settings_service
@ -29,29 +31,26 @@ method init*[T](self: Controller[T]) =
discard discard
method getProfile*[T](self: Controller[T]): item.Item = method getProfile*[T](self: Controller[T]): item.Item =
let loggedInAccount = self.accountsService.getLoggedInAccount()
var pubKey = self.settingsService.getPubKey()
var network = self.settingsService.getNetwork() var network = self.settingsService.getNetwork()
var appearance = self.settingsService.getAppearance() var appearance = self.settingsService.getAppearance()
var messagesFromContactsOnly = self.settingsService.getMessagesFromContactsOnly() var messagesFromContactsOnly = self.settingsService.getMessagesFromContactsOnly()
var sendUserStatus = self.settingsService.getSendUserStatus()
var currentUserStatus = self.settingsService.getCurrentUserStatus() var identityImage = item.IdentityImage(thumbnail: singletonInstance.userProfile.getThumbnailImage(),
var obj = self.settingsService.getIdentityImage(loggedInAccount.keyUid) large: singletonInstance.userProfile.getLargeImage())
var identityImage = item.IdentityImage(thumbnail: obj.thumbnail, large: obj.large)
var item = item.Item( var item = item.Item(
id: pubkey, id: singletonInstance.userProfile.getPubKey(),
alias: "", alias: "",
username: loggedInAccount.name, username: singletonInstance.userProfile.getUsername(),
identicon: loggedInAccount.identicon, identicon: singletonInstance.userProfile.getThumbnailImage(),
address: loggedInAccount.keyUid, address: singletonInstance.userProfile.getAddress(),
ensName: "", ensName: singletonInstance.userProfile.getEnsName(),
ensVerified: false, ensVerified: false,
localNickname: "", localNickname: "",
messagesFromContactsOnly: messagesFromContactsOnly, messagesFromContactsOnly: messagesFromContactsOnly,
sendUserStatus: sendUserStatus, sendUserStatus: singletonInstance.userProfile.getSendUserStatus(),
currentUserStatus: currentUserStatus, currentUserStatus: singletonInstance.userProfile.getCurrentUserStatus(),
identityImage: identityImage, identityImage: identityImage,
appearance: appearance, appearance: appearance,
added: false, added: false,