2
0
mirror of https://github.com/kotatogram/kotatogram-desktop synced 2025-08-30 22:25:12 +00:00

Implement simple UI for single-type likes in stories.

This commit is contained in:
John Preston
2023-08-02 21:41:58 +02:00
parent 3adb0c1856
commit 4bd925ac2c
27 changed files with 235 additions and 64 deletions

View File

@@ -276,8 +276,13 @@ bool Story::edited() const {
return _edited;
}
bool Story::canDownload() const {
return /*!forbidsForward() || */_peer->isSelf();
bool Story::canDownloadIfPremium() const {
return !forbidsForward() || _peer->isSelf();
}
bool Story::canDownloadChecked() const {
return _peer->isSelf()
|| (canDownloadIfPremium() && _peer->session().premium());
}
bool Story::canShare() const {

View File

@@ -100,7 +100,8 @@ public:
[[nodiscard]] bool forbidsForward() const;
[[nodiscard]] bool edited() const;
[[nodiscard]] bool canDownload() const;
[[nodiscard]] bool canDownloadIfPremium() const;
[[nodiscard]] bool canDownloadChecked() const;
[[nodiscard]] bool canShare() const;
[[nodiscard]] bool canDelete() const;
[[nodiscard]] bool canReport() const;