fix: ensure app sections work correctly

We've recently removed timeline related code from the application.
It seems that either a) new changes have been introduced related to timeline
despite it being removed from the application, or b) a few more changes
where left out as part of the new architecture.

This causes the app to misbehave when selecting sections in the application
nav bar.

This commit fixes this by removing leftover timeline related code.
This commit is contained in:
Pascal Precht 2021-12-06 14:34:53 +01:00 committed by Sale Djenic
parent b3f8af8e06
commit 27f8c33dbd
6 changed files with 5 additions and 48 deletions

View File

@ -14,10 +14,6 @@ const BROWSER_SECTION_ID* = "browser"
const BROWSER_SECTION_NAME* = "Browser"
const BROWSER_SECTION_ICON* = "browser"
const TIMELINE_SECTION_ID* = "timeline"
const TIMELINE_SECTION_NAME* = "Timeline"
const TIMELINE_SECTION_ICON* = "status-update"
const NODEMANAGEMENT_SECTION_ID* = "nodeManagement"
const NODEMANAGEMENT_SECTION_NAME* = "Node Management"
const NODEMANAGEMENT_SECTION_ICON* = "node"

View File

@ -7,7 +7,6 @@ type
Wallet,
WalletV2,
Browser,
Timeline,
ProfileSettings,
NodeManagement

View File

@ -187,14 +187,6 @@ method load*[T](
if(activeSectionId == browserSectionItem.id):
activeSection = browserSectionItem
# Timeline Section
let timelineSectionItem = initItem(conf.TIMELINE_SECTION_ID, SectionType.Timeline, conf.TIMELINE_SECTION_NAME, "",
conf.TIMELINE_SECTION_ICON, "", false, 0,
false, singletonInstance.localAccountSensitiveSettings.getTimelineEnabled())
self.view.addItem(timelineSectionItem)
if(activeSectionId == timelineSectionItem.id):
activeSection = timelineSectionItem
# Node Management Section
let nodeManagementSectionItem = initItem(conf.NODEMANAGEMENT_SECTION_ID, SectionType.NodeManagement,
conf.NODEMANAGEMENT_SECTION_NAME, "", conf.NODEMANAGEMENT_SECTION_ICON, "", false, 0, false,

View File

@ -10,7 +10,6 @@ import shared.panels 1.0
import shared.popups 1.0
import shared.status 1.0
import "./AppLayouts"
import "./AppLayouts/Timeline"
import "./AppLayouts/Wallet"
import "./AppLayouts/WalletV2"
import "./AppLayouts/Chat/popups"
@ -374,9 +373,6 @@ Item {
else if(mainModule.activeSection.sectionType === Constants.appSection.browser) {
return Constants.appViewStackIndex.browser
}
else if(mainModule.activeSection.sectionType === Constants.appSection.timeline) {
return Constants.appViewStackIndex.timeline
}
else if(mainModule.activeSection.sectionType === Constants.appSection.profile) {
return Constants.appViewStackIndex.profile
}
@ -401,10 +397,6 @@ Item {
browserLayoutContainer.active = true;
}
if(obj === timelineLayoutContainer){
timelineLayoutContainer.active = true
}
if(obj === walletLayoutContainer){
walletLayoutContainer.showSigningPhrasePopup();
}
@ -469,24 +461,6 @@ Item {
property var _web3Provider: web3Provider
}
Loader {
id: timelineLayoutContainer
sourceComponent: Component {
TimelineLayout {
messageStore: appMain.rootStore.messageStore
rootStore: appMain.rootStore
Component.onCompleted: {
chatCommunitySectionModule = mainModule.getChatSectionModule()
}
}
}
onLoaded: timelineLayoutContainer.item.onActivated()
active: false
Layout.fillWidth: true
Layout.alignment: Qt.AlignLeft | Qt.AlignTop
Layout.fillHeight: true
}
ProfileLayout {
id: profileLayoutContainer
Layout.fillWidth: true

View File

@ -15,20 +15,18 @@ QtObject {
readonly property int wallet: 2
readonly property int walletv2: 3
readonly property int browser: 4
readonly property int timeline: 5
readonly property int profile: 6
readonly property int node: 7
readonly property int profile: 5
readonly property int node: 6
}
readonly property QtObject appViewStackIndex: QtObject {
readonly property int chat: 0
readonly property int community: 7 // any stack layout children with the index 7 or higher is community
readonly property int wallet: 1
readonly property int walletv2: 6
readonly property int walletv2: 5
readonly property int browser: 2
readonly property int timeline: 3
readonly property int profile: 4
readonly property int node: 5
readonly property int profile: 3
readonly property int node: 4
}
readonly property QtObject osNotificationType: QtObject{

View File

@ -434,8 +434,6 @@ StatusWindow {
// chatsModel.channelView.activeChannel.chatType === Constants.chatType.privateGroupChat
// )
// ) ||
// // in timeline view
// loader.item.appLayout.appView.currentIndex === Constants.appViewStackIndex.timeline ||
// // In community section
// chatsModel.communities.activeCommunity.active
// )