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:
Steve AB7PA 2021-05-11 19:27:05 -07:00 committed by GitHub
parent 232d7bf6b2
commit 780b696398
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 7 additions and 3 deletions

View File

@ -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