Ensure device_id (#15151)

This commit is contained in:
hius07 authored and GitHub committed 2026-03-23 18:07:29 +02:00
1 parent 0402180684
commit 628ea23817
3 files changed
+7 -7

No files matched your search

+6
View File
@@ -39,6 +39,12 @@ local DataStorage = require("datastorage")
G_reader_settings = require("luasettings"):open(
DataStorage:getDataDir().."/settings.reader.lua")
local device_id = G_reader_settings:readSetting("device_id")
if device_id == nil or device_id == "" then
local random = require("random")
G_reader_settings:saveSetting("device_id", random.uuid())
end
-- Apply the JIT opt tweaks ASAP when the C BB is disabled,
-- because we want to avoid the jit.flush() from bb:enableCBB,
-- which only makes the mcode allocation issues worse on Android...