feat(github): offline label (#1825)
Adds `format-offline` and `label-offline` * feat(github): offline label & fixes * Clear label if there are no notifications and empty-notifications = false * clang-format Co-authored-by: Patrick Ziegler <p.ziegler96@gmail.com>
This commit is contained in:
parent
8d2b0d2747
commit
683cfc0738
2 changed files with 40 additions and 11 deletions
include/modules
|
@ -16,18 +16,24 @@ namespace modules {
|
|||
|
||||
bool update();
|
||||
bool build(builder* builder, const string& tag) const;
|
||||
string get_format() const;
|
||||
|
||||
|
||||
private:
|
||||
void update_label(int);
|
||||
int get_number_of_notification();
|
||||
string request();
|
||||
static constexpr auto TAG_LABEL = "<label>";
|
||||
static constexpr auto TAG_LABEL_OFFLINE = "<label-offline>";
|
||||
static constexpr auto FORMAT_OFFLINE = "format-offline";
|
||||
|
||||
label_t m_label{};
|
||||
label_t m_label_offline{};
|
||||
string m_api_url;
|
||||
string m_accesstoken{};
|
||||
unique_ptr<http_downloader> m_http{};
|
||||
bool m_empty_notifications{false};
|
||||
std::atomic<bool> m_offline{false};
|
||||
};
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue