Add helper fn for checking if opened input is theme preview file

This commit is contained in:
Ethan P committed 2020-05-15 12:20:20 -07:00
1 parent 59140b458c
commit cc52f79e42
2 files changed
+10 -5

No files matched your search

+9
View File
@@ -39,6 +39,15 @@ pub(crate) enum OpenedInputKind {
CustomReader,
}
impl OpenedInputKind {
pub(crate) fn is_theme_preview_file(&self) -> bool {
match self {
OpenedInputKind::ThemePreviewFile => true,
_ => false,
}
}
}
pub(crate) struct OpenedInput<'a> {
pub(crate) kind: OpenedInputKind,
pub(crate) metadata: InputMetadata,