@@ -14,15 +14,17 @@ export const useChangedQuerySettings = () => {
1414 const [ lastQuerySettings ] = useLastQueryExecutionSettings ( ) ;
1515 const [ currentQuerySettings ] = useQueryExecutionSettings ( ) ;
1616
17- const changedLastExucutionSettings = lastQuerySettings
17+ const changedLastExecutionSettings = lastQuerySettings
1818 ? getChangedQueryExecutionSettings ( lastQuerySettings , DEFAULT_QUERY_SETTINGS )
1919 : [ ] ;
2020
2121 const changedCurrentSettings = currentQuerySettings
2222 ? getChangedQueryExecutionSettings ( currentQuerySettings , DEFAULT_QUERY_SETTINGS )
2323 : [ ] ;
2424
25- const hasChangedLastExucutionSettings = changedLastExucutionSettings . length > 0 ;
25+ const hasChangedImportantSettings =
26+ changedLastExecutionSettings . includes ( 'transactionMode' ) ||
27+ changedLastExecutionSettings . includes ( 'queryMode' ) ;
2628
2729 const changedLastExecutionSettingsDescriptions = lastQuerySettings
2830 ? getChangedQueryExecutionSettingsDescription ( {
@@ -42,23 +44,21 @@ export const useChangedQuerySettings = () => {
4244 bannerLastClosedTimestamp &&
4345 Date . now ( ) - bannerLastClosedTimestamp < WEEK_IN_SECONDS * 1000 ;
4446
45- const isBannerShown = hasChangedLastExucutionSettings && ! isClosedRecently ;
46- const isIndicatorShown = hasChangedLastExucutionSettings && isClosedRecently ;
47+ const isBannerShown = hasChangedImportantSettings && ! isClosedRecently ;
4748
4849 const closeBanner = ( ) => setBannerLastClosedTimestamp ( Date . now ( ) ) ;
4950
5051 const resetBanner = ( ) => setBannerLastClosedTimestamp ( undefined ) ;
5152
5253 return {
5354 isBannerShown,
54- isIndicatorShown,
5555 closeBanner,
5656 resetBanner,
5757
5858 changedCurrentSettings,
5959 changedCurrentSettingsDescriptions,
6060
61- changedLastExucutionSettings ,
61+ changedLastExecutionSettings ,
6262 changedLastExecutionSettingsDescriptions,
6363 } ;
6464} ;
0 commit comments