Merge branch 'main' of github.com:standardnotes/app

This commit is contained in:
Aman Harwara
2022-12-19 14:44:46 +05:30
53 changed files with 527 additions and 1442 deletions

View File

@@ -22,10 +22,11 @@ const PreferencesButton = ({ openPreferences }: Props) => {
const [changelogLastReadVersion, setChangelogLastReadVersion] = useState(() =>
application.changelogService.getLastReadVersion(),
)
const isChangelogUnread = useMemo(
() => (changelogLastReadVersion ? compareSemVersions(application.version, changelogLastReadVersion) > 0 : false),
[application.version, changelogLastReadVersion],
)
const isChangelogUnread = useMemo(() => {
return changelogLastReadVersion && !application.isNativeMobileWeb()
? compareSemVersions(application.version, changelogLastReadVersion) > 0
: false
}, [application, changelogLastReadVersion])
useEffect(
() => application.changelogService.addLastReadChangeListener(setChangelogLastReadVersion),
[application.changelogService],