@@ -47,24 +47,31 @@ export default class EmojiStyleSetting extends IconFolderSetting {
4747
4848 if ( emoji . isEmoji ( iconName ) ) {
4949 dom . createIconNode ( this . plugin , path , iconName ) ;
50- const tabLeaves = iconTabs . getTabLeavesOfFilePath ( this . plugin , path ) ;
51- for ( const tabLeaf of tabLeaves ) {
52- iconTabs . update (
50+ if ( this . plugin . getSettings ( ) . iconInTabsEnabled ) {
51+ const tabLeaves = iconTabs . getTabLeavesOfFilePath (
5352 this . plugin ,
54- iconName ,
55- tabLeaf . tabHeaderInnerIconEl ,
53+ path ,
5654 ) ;
55+ for ( const tabLeaf of tabLeaves ) {
56+ iconTabs . update (
57+ this . plugin ,
58+ iconName ,
59+ tabLeaf . tabHeaderInnerIconEl ,
60+ ) ;
61+ }
5762 }
5863
59- for ( const openedFile of getAllOpenedFiles ( this . plugin ) ) {
60- const activeView = openedFile . leaf . view as InlineTitleView ;
61- if (
62- activeView instanceof MarkdownView &&
63- openedFile . path === path
64- ) {
65- titleIcon . add ( this . plugin , activeView . inlineTitleEl , iconName , {
66- fontSize : calculateInlineTitleSize ( ) ,
67- } ) ;
64+ if ( this . plugin . getSettings ( ) . iconInTitleEnabled ) {
65+ for ( const openedFile of getAllOpenedFiles ( this . plugin ) ) {
66+ const activeView = openedFile . leaf . view as InlineTitleView ;
67+ if (
68+ activeView instanceof MarkdownView &&
69+ openedFile . path === path
70+ ) {
71+ titleIcon . add ( this . plugin , activeView . inlineTitleEl , iconName , {
72+ fontSize : calculateInlineTitleSize ( ) ,
73+ } ) ;
74+ }
6875 }
6976 }
7077 }
0 commit comments