mirror of
https://github.com/hydralauncher/hydra.git
synced 2026-01-20 01:33:56 +00:00
feat: code adjustments
This commit is contained in:
@@ -81,14 +81,14 @@ export const publishNotificationUpdateReadyToInstall = async (
|
||||
};
|
||||
|
||||
export const publishNewFriendRequestNotification = async () => {
|
||||
const userPreferences = await db.get<string, UserPreferences>(
|
||||
const userPreferences = await db.get<string, UserPreferences | null>(
|
||||
levelKeys.userPreferences,
|
||||
{
|
||||
valueEncoding: "json",
|
||||
}
|
||||
);
|
||||
|
||||
if (!userPreferences.friendRequestNotificationsEnabled) return;
|
||||
if (!userPreferences?.friendRequestNotificationsEnabled) return;
|
||||
|
||||
new Notification({
|
||||
title: t("new_friend_request_title", {
|
||||
|
||||
@@ -29,14 +29,14 @@ export class UpdateManager {
|
||||
}
|
||||
|
||||
if (process.platform === "linux") {
|
||||
const userPreferences = await db.get<string, UserPreferences>(
|
||||
const userPreferences = await db.get<string, UserPreferences | null>(
|
||||
levelKeys.userPreferences,
|
||||
{
|
||||
valueEncoding: "json",
|
||||
}
|
||||
);
|
||||
|
||||
return userPreferences.enableAutoInstall === true;
|
||||
return userPreferences?.enableAutoInstall === true;
|
||||
}
|
||||
|
||||
return false;
|
||||
|
||||
Reference in New Issue
Block a user