fix(@desktop/general): Application shows chat screen instead of settings screen when starting.
Fix #5839
This commit is contained in:
parent
49ca3e1c36
commit
ec76d8e738
|
@ -239,7 +239,8 @@ proc getActiveSectionId*(self: Controller): string =
|
|||
|
||||
proc setActiveSection*(self: Controller, sectionId: string) =
|
||||
self.activeSectionId = sectionId
|
||||
singletonInstance.localAccountSensitiveSettings.setActiveSection(self.activeSectionId)
|
||||
let sectionIdToSave = if (sectionId == conf.SETTINGS_SECTION_ID): "" else: sectionId
|
||||
singletonInstance.localAccountSensitiveSettings.setActiveSection(sectionIdToSave)
|
||||
self.delegate.activeSectionSet(self.activeSectionId)
|
||||
|
||||
proc getNumOfNotificaitonsForChat*(self: Controller): tuple[unviewed:int, mentions:int] =
|
||||
|
|
|
@ -378,7 +378,11 @@ method load*[T](
|
|||
#self.communitiesPortalSectionModule.load()
|
||||
|
||||
# Set active section on app start
|
||||
self.setActiveSection(activeSection)
|
||||
# If section is profile then open chat by default
|
||||
if activeSection.sectionType == SectionType.ProfileSettings:
|
||||
self.setActiveSection(self.view.model().getItemBySectionType(SectionType.Chat))
|
||||
else:
|
||||
self.setActiveSection(activeSection)
|
||||
|
||||
proc checkIfModuleDidLoad [T](self: Module[T]) =
|
||||
if self.moduleLoaded:
|
||||
|
|
Loading…
Reference in New Issue