mirror of
				https://github.com/rad4day/Waybar.git
				synced 2025-10-29 23:22:41 +01:00 
			
		
		
		
	Fixed time_left string not being set properly
This commit is contained in:
		| @@ -281,17 +281,15 @@ auto UPower::update() -> void { | |||||||
|  |  | ||||||
|   uint tooltipCount = 0; |   uint tooltipCount = 0; | ||||||
|  |  | ||||||
|   std::string time_full_format = timeToString(time_full); |  | ||||||
|   std::string time_empty_format = timeToString(time_full); |  | ||||||
|   std::string time_format = ""; |   std::string time_format = ""; | ||||||
|   switch (state) { |   switch (state) { | ||||||
|     case UP_DEVICE_STATE_CHARGING: |     case UP_DEVICE_STATE_CHARGING: | ||||||
|     case UP_DEVICE_STATE_PENDING_CHARGE: |     case UP_DEVICE_STATE_PENDING_CHARGE: | ||||||
|       time_format = time_full_format; |       time_format = timeToString(time_full); | ||||||
|       break; |       break; | ||||||
|     case UP_DEVICE_STATE_DISCHARGING: |     case UP_DEVICE_STATE_DISCHARGING: | ||||||
|     case UP_DEVICE_STATE_PENDING_DISCHARGE: |     case UP_DEVICE_STATE_PENDING_DISCHARGE: | ||||||
|       time_format = time_empty_format; |       time_format = timeToString(time_empty); | ||||||
|       break; |       break; | ||||||
|     default: |     default: | ||||||
|       break; |       break; | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 Erik Reider
					Erik Reider