mirror of https://github.com/aredn/aredn.git
fix: Local Alert File Read All (#102)
* fix: Local Alert File Read All Read the entire local_message file rather than just the first line. * fix: Local Alert File Read All Also fix the issue with empty alert files showing empty newui alert dialogs.
This commit is contained in:
parent
232d7bf6b2
commit
780b696398
|
@ -144,7 +144,9 @@ function model.getArednAlert()
|
|||
afile:close()
|
||||
end
|
||||
end
|
||||
return alert
|
||||
if #alert~=0 then return alert
|
||||
else return ""
|
||||
end
|
||||
end
|
||||
|
||||
-------------------------------------
|
||||
|
@ -156,11 +158,13 @@ function model.getLocalAlert()
|
|||
if file_exists(fname) then
|
||||
afile=io.open(fname,"r")
|
||||
if afile~=nil then
|
||||
alert=afile:read()
|
||||
alert=afile:read("*a")
|
||||
afile:close()
|
||||
end
|
||||
end
|
||||
return alert
|
||||
if #alert~=0 then return alert
|
||||
else return ""
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue