mirror of
https://github.com/rad4day/Waybar.git
synced 2023-12-21 10:22:59 +01:00
fix: lint
This commit is contained in:
parent
31e4c9023e
commit
fc632f50ec
@ -83,7 +83,9 @@ Mpris::Mpris(const std::string& id, const Json::Value& config)
|
||||
// "dynamic-priority" has been kept for backward compatibility
|
||||
if (config_["dynamic-importance-order"].isArray() || config_["dynamic-priority"].isArray()) {
|
||||
dynamic_prio_.clear();
|
||||
const auto& dynamic_priority = config_["dynamic-importance-order"].isArray() ? config_["dynamic-importance-order"] : config_["dynamic-priority"];
|
||||
const auto& dynamic_priority = config_["dynamic-importance-order"].isArray()
|
||||
? config_["dynamic-importance-order"]
|
||||
: config_["dynamic-priority"];
|
||||
for (const auto& value : dynamic_priority) {
|
||||
if (value.isString()) {
|
||||
dynamic_prio_.push_back(value.asString());
|
||||
@ -361,12 +363,9 @@ auto Mpris::getDynamicStr(const PlayerInfo& info, bool truncated, bool html) ->
|
||||
std::string previousOrder = "";
|
||||
|
||||
for (const std::string& order : dynamic_order_) {
|
||||
if ((order == "artist" && showArtist) ||
|
||||
(order == "album" && showAlbum) ||
|
||||
if ((order == "artist" && showArtist) || (order == "album" && showAlbum) ||
|
||||
(order == "title" && showTitle)) {
|
||||
if (previousShown &&
|
||||
previousOrder != "length" &&
|
||||
previousOrder != "position") {
|
||||
if (previousShown && previousOrder != "length" && previousOrder != "position") {
|
||||
dynamic << dynamic_separator_;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user