Skip to content

Commit 2633ff3

Browse files
committed
Fixed time_left string not being set properly
1 parent 0764e9a commit 2633ff3

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

src/modules/upower/upower.cpp

+2-4
Original file line numberDiff line numberDiff line change
@@ -281,17 +281,15 @@ auto UPower::update() -> void {
281281

282282
uint tooltipCount = 0;
283283

284-
std::string time_full_format = timeToString(time_full);
285-
std::string time_empty_format = timeToString(time_full);
286284
std::string time_format = "";
287285
switch (state) {
288286
case UP_DEVICE_STATE_CHARGING:
289287
case UP_DEVICE_STATE_PENDING_CHARGE:
290-
time_format = time_full_format;
288+
time_format = timeToString(time_full);
291289
break;
292290
case UP_DEVICE_STATE_DISCHARGING:
293291
case UP_DEVICE_STATE_PENDING_DISCHARGE:
294-
time_format = time_empty_format;
292+
time_format = timeToString(time_empty);
295293
break;
296294
default:
297295
break;

0 commit comments

Comments
 (0)