mirror of
https://github.com/IgorTimofeev/MineOS.git
synced 2025-12-20 11:09:21 +01:00
Profile info fix
This commit is contained in:
parent
e27ad986f4
commit
dadbd40a83
@ -15,7 +15,7 @@ local MineOSCore = require("MineOSCore")
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
local VKAPIVersion = 5.85
|
||||
local VKAPIVersion = "5.85"
|
||||
|
||||
local config = {
|
||||
avatars = {
|
||||
@ -991,17 +991,22 @@ showUserProfile = function(peerID)
|
||||
container.height = #lines
|
||||
end
|
||||
|
||||
local function isTypeValid(what)
|
||||
local whatType = type(what)
|
||||
return what and (whatType == "string" and #what > 0 or whatType == "number" and what ~= 0)
|
||||
end
|
||||
|
||||
local function anyExists(...)
|
||||
local args = {...}
|
||||
for i = 1, #args do
|
||||
if args[i] and (type(args[i]) ~= "string" or #args[i] > 0) then
|
||||
if isTypeValid(args[i]) then
|
||||
return true
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
local function addIfExists(what, ...)
|
||||
if what and (type(what) ~= "string" or #what > 0) then
|
||||
if isTypeValid(what) then
|
||||
addKeyAndValue(...)
|
||||
end
|
||||
end
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user