Skip to content

Commit

Permalink
remove dev-mode code
Browse files Browse the repository at this point in the history
  • Loading branch information
junkdog committed Sep 29, 2024
1 parent 0b9d70f commit 1548d36
Show file tree
Hide file tree
Showing 4 changed files with 1 addition and 25 deletions.
2 changes: 0 additions & 2 deletions src/event.rs
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,6 @@ pub enum GlimEvent {
ProjectUpdated(Box<Project>),
DismissNotification,
ToggleColorDepth,

EmitNotification(u8)
}

#[derive(Debug, Clone, Copy)]
Expand Down
20 changes: 1 addition & 19 deletions src/glim_app.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ use crate::gruvbox::Gruvbox::{Dark0Hard, Dark3};
use crate::id::{PipelineId, ProjectId};
use crate::input::InputMultiplexer;
use crate::input::processor::NormalModeProcessor;
use crate::notice_service::{Notice, NoticeLevel, NoticeMessage, NoticeService};
use crate::notice_service::{Notice, NoticeLevel, NoticeService};
use crate::stores::{InternalLogsStore, ProjectStore};
use crate::ui::popup::{ConfigPopupState, PipelineActionsPopupState, ProjectDetailsPopupState};
use crate::ui::widget::NotificationState;
Expand Down Expand Up @@ -364,24 +364,6 @@ impl GlimApp {
}
},

GlimEvent::EmitNotification(n) => {
match n {
0 => {
self.notices.push_notice(
NoticeLevel::Info,
NoticeMessage::GeneralMessage("This is a test notification".to_string())
);
},
_ => {
let project = self.project_store.projects().first().unwrap();
self.notices.push_notice(
NoticeLevel::Error,
NoticeMessage::GitlabGetTriggerJobsError(project.id, PipelineId::new(123), "This is a test error".to_string())
)
},
}
}

_ => {}
}

Expand Down
2 changes: 0 additions & 2 deletions src/input/processor/normal.rs
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,6 @@ impl NormalModeProcessor {
KeyCode::Char('w') => self.selected.map(GlimEvent::BrowseToProject),
KeyCode::Up => Some(GlimEvent::SelectPreviousProject),
KeyCode::Down => Some(GlimEvent::SelectNextProject),
KeyCode::F(1) => Some(GlimEvent::EmitNotification(0)),
KeyCode::F(2) => Some(GlimEvent::EmitNotification(1)),
KeyCode::F(12) => Some(GlimEvent::ToggleColorDepth),
_ => None
} { self.dispatch(e) }
Expand Down
2 changes: 0 additions & 2 deletions src/stores.rs
Original file line number Diff line number Diff line change
Expand Up @@ -227,8 +227,6 @@ impl InternalLogsStore {
GlimEvent::SelectNextProject => None,
GlimEvent::SelectPreviousProject => None,
GlimEvent::ToggleInternalLogs => None,

GlimEvent::EmitNotification(_) => None,
} {
self.logs.push((Local::now(), log));
}
Expand Down

0 comments on commit 1548d36

Please sign in to comment.