Очень актуальная иконка

This commit is contained in:
Igor Timofeev 2018-03-24 19:36:16 +03:00
parent 4c4bb6b37a
commit 4adb1064dd
2 changed files with 10 additions and 12 deletions

View File

@ -1329,6 +1329,16 @@ newPublicationInfo = function(file_id)
mainMenu(2, publication.user_name)
end
local existingReviewText
if #reviews > 0 then
for i = 1, #reviews do
if reviews[i].user_name == user.name then
existingReviewText = reviews[i].comment
break
end
end
end
buttonsLayout:addChild(GUI.adaptiveRoundedButton(1, 1, 1, 0, 0xA5A5A5, 0xFFFFFF, 0x2D2D2D, 0xFFFFFF, existingReviewText and localization.changeReview or localization.writeReview)).onTouch = function()
local container = MineOSInterface.addUniversalContainer(window, existingReviewText and localization.changeReview or localization.writeReview)
container.layout:setCellFitting(2, 1, false, false)
@ -1446,18 +1456,6 @@ newPublicationInfo = function(file_id)
ratingsContainer.panel.height = textDetailsContainer.height
detailsContainer.height = textDetailsContainer.height
if user.token and user.name ~= publication.user_name then
local existingReviewText
if #reviews > 0 then
for i = 1, #reviews do
if reviews[i].user_name == user.name then
existingReviewText = reviews[i].comment
break
end
end
end
end
if #reviews > 0 then
-- Отображаем все оценки
layout:addChild(GUI.text(1, 1, 0x696969, localization.reviewsOfUsers))

BIN
Icons/Idiot.pic Normal file

Binary file not shown.