@@ -14,15 +14,17 @@ export const useChangedQuerySettings = () => {
14
14
const [ lastQuerySettings ] = useLastQueryExecutionSettings ( ) ;
15
15
const [ currentQuerySettings ] = useQueryExecutionSettings ( ) ;
16
16
17
- const changedLastExucutionSettings = lastQuerySettings
17
+ const changedLastExecutionSettings = lastQuerySettings
18
18
? getChangedQueryExecutionSettings ( lastQuerySettings , DEFAULT_QUERY_SETTINGS )
19
19
: [ ] ;
20
20
21
21
const changedCurrentSettings = currentQuerySettings
22
22
? getChangedQueryExecutionSettings ( currentQuerySettings , DEFAULT_QUERY_SETTINGS )
23
23
: [ ] ;
24
24
25
- const hasChangedLastExucutionSettings = changedLastExucutionSettings . length > 0 ;
25
+ const hasChangedImportantSettings =
26
+ changedLastExecutionSettings . includes ( 'transactionMode' ) ||
27
+ changedLastExecutionSettings . includes ( 'queryMode' ) ;
26
28
27
29
const changedLastExecutionSettingsDescriptions = lastQuerySettings
28
30
? getChangedQueryExecutionSettingsDescription ( {
@@ -42,23 +44,21 @@ export const useChangedQuerySettings = () => {
42
44
bannerLastClosedTimestamp &&
43
45
Date . now ( ) - bannerLastClosedTimestamp < WEEK_IN_SECONDS * 1000 ;
44
46
45
- const isBannerShown = hasChangedLastExucutionSettings && ! isClosedRecently ;
46
- const isIndicatorShown = hasChangedLastExucutionSettings && isClosedRecently ;
47
+ const isBannerShown = hasChangedImportantSettings && ! isClosedRecently ;
47
48
48
49
const closeBanner = ( ) => setBannerLastClosedTimestamp ( Date . now ( ) ) ;
49
50
50
51
const resetBanner = ( ) => setBannerLastClosedTimestamp ( undefined ) ;
51
52
52
53
return {
53
54
isBannerShown,
54
- isIndicatorShown,
55
55
closeBanner,
56
56
resetBanner,
57
57
58
58
changedCurrentSettings,
59
59
changedCurrentSettingsDescriptions,
60
60
61
- changedLastExucutionSettings ,
61
+ changedLastExecutionSettings ,
62
62
changedLastExecutionSettingsDescriptions,
63
63
} ;
64
64
} ;
0 commit comments