Upload limit: don't display progress when maxed out

This commit is contained in:
nonamethanks
2020-08-11 04:24:16 +02:00
parent afc07d8adf
commit bc8fc1839f
2 changed files with 9 additions and 1 deletions

View File

@@ -30,6 +30,10 @@ class UploadLimit
end
end
def maxed?
user.upload_points >= MAXIMUM_POINTS
end
def used_upload_slots
pending = user.posts.pending
early_deleted = user.posts.deleted.where("created_at >= ?", 3.days.ago)