File tree Expand file tree Collapse file tree 2 files changed +22
-1
lines changed Expand file tree Collapse file tree 2 files changed +22
-1
lines changed Original file line number Diff line number Diff line change @@ -12,5 +12,24 @@ internal class PaneNavigationArguments
12
12
public string ? RightPaneNavPathParam { get ; set ; }
13
13
14
14
public string ? RightPaneSelectItemParam { get ; set ; }
15
+
16
+ public static bool operator == ( PaneNavigationArguments ? a1 , PaneNavigationArguments ? a2 )
17
+ {
18
+ if ( a1 is null && a2 is null )
19
+ return true ;
20
+
21
+ if ( a1 is null || a2 is null )
22
+ return false ;
23
+
24
+ return a1 . LeftPaneNavPathParam == a2 . LeftPaneNavPathParam &&
25
+ a1 . LeftPaneSelectItemParam == a2 . LeftPaneSelectItemParam &&
26
+ a1 . RightPaneNavPathParam == a2 . RightPaneNavPathParam &&
27
+ a1 . RightPaneSelectItemParam == a2 . RightPaneSelectItemParam ;
28
+ }
29
+
30
+ public static bool operator != ( PaneNavigationArguments ? a1 , PaneNavigationArguments ? a2 )
31
+ {
32
+ return ! ( a1 == a2 ) ;
33
+ }
15
34
}
16
35
}
Original file line number Diff line number Diff line change @@ -187,7 +187,9 @@ public async Task UpdateTabInfoAsync(Files.App.UserControls.TabBar.TabBarItem ta
187
187
}
188
188
189
189
// Don't update tabItem if the contents of the tab have already changed
190
- if ( result . Item1 is not null && navigationArg == tabItem . NavigationParameter . NavigationParameter )
190
+ if ( result . Item1 is not null &&
191
+ ( navigationArg is PaneNavigationArguments && navigationArg as PaneNavigationArguments == tabItem . NavigationParameter . NavigationParameter as PaneNavigationArguments
192
+ || navigationArg is string && navigationArg as string == tabItem . NavigationParameter . NavigationParameter as string ) )
191
193
( tabItem . Header , tabItem . IconSource , tabItem . ToolTipText ) = result ;
192
194
}
193
195
You can’t perform that action at this time.
0 commit comments