Verified Commit 3bb3fc69 authored by Fushan Wen's avatar Fushan Wen 💬
Browse files

wallpapers/potd: always set value in `setUpdateOverMeteredConnection`

Don't return if values are the same because there can be multiple
backends. Instead, let updateSource() decide whether to update
the wallpaper.

Test: change category of the unsplash provider when using metered
connection and "update over metered connection" is enabled
parent 4feeabf0
Pipeline #222781 passed with stage
in 1 minute and 41 seconds
......@@ -95,13 +95,13 @@ void PotdClient::updateSource(bool refresh)
#if HAVE_NetworkManagerQt
void PotdClient::setUpdateOverMeteredConnection(int value)
{
if (m_doesUpdateOverMeteredConnection == value) {
return;
}
// Don't return if values are the same because there can be multiple
// backends. Instead, let updateSource() decide whether to update
// the wallpaper.
m_doesUpdateOverMeteredConnection = value;
if (m_doesUpdateOverMeteredConnection == 1 && isUsingMeteredConnection()) {
updateSource(true);
updateSource();
}
}
#endif
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment