Fix that the inbox is being fetched on initial startup
This commit is contained in:
@@ -78,7 +78,6 @@ impl SimpleComponent for InboxPage {
|
||||
let model = Self { mentions, page: 1, unread_only: false, type_: InboxType::Mentions };
|
||||
let mentions = model.mentions.widget();
|
||||
let widgets = view_output!();
|
||||
sender.input(InboxInput::FetchInbox);
|
||||
ComponentParts { model, widgets }
|
||||
}
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@ pub mod util;
|
||||
pub mod dialogs;
|
||||
|
||||
use api::{user::default_person, community::default_community, post::default_post};
|
||||
use components::{post_row::PostRow, community_row::CommunityRow, profile_page::{ProfilePage, self}, community_page::{CommunityPage, self}, post_page::{PostPage, self}, inbox_page::InboxPage};
|
||||
use components::{post_row::PostRow, community_row::CommunityRow, profile_page::{ProfilePage, self}, community_page::{CommunityPage, self}, post_page::{PostPage, self}, inbox_page::{InboxPage, InboxInput}};
|
||||
use gtk::prelude::*;
|
||||
use lemmy_api_common::{lemmy_db_views_actor::structs::CommunityView, lemmy_db_views::structs::PostView, person::GetPersonDetailsResponse, lemmy_db_schema::{newtypes::PostId, ListingType}, post::GetPostResponse, community::GetCommunityResponse};
|
||||
use relm4::{prelude::*, factory::FactoryVecDeque, set_global_css, actions::{RelmAction, RelmActionGroup}};
|
||||
@@ -504,6 +504,7 @@ impl SimpleComponent for App {
|
||||
}
|
||||
AppMsg::OpenInbox => {
|
||||
self.state = AppState::Inbox;
|
||||
self.inbox_page.sender().emit(InboxInput::FetchInbox);
|
||||
}
|
||||
AppMsg::LoggedIn => {
|
||||
self.logged_in = true;
|
||||
|
||||
Reference in New Issue
Block a user