imageView: Check set wallpaper response

Closes #166
This commit is contained in:
FineFindus 2023-05-24 15:34:52 +00:00 • committed by Sophie Herold
parent 9a940a43ba
commit 32be6c8246

View file

@ -37,8 +37,7 @@ use crate::util::spawn;
use adw::prelude::*; use adw::prelude::*;
use adw::subclass::prelude::*; use adw::subclass::prelude::*;
use anyhow::Context; use anyhow::Context;
use ashpd::desktop::wallpaper; use ashpd::desktop::{wallpaper, ResponseError};
use ashpd::desktop::ResponseError;
use ashpd::Error; use ashpd::Error;
use ashpd::WindowIdentifier; use ashpd::WindowIdentifier;
use glib::clone; use glib::clone;
@ -640,6 +639,7 @@ impl LpImageView {
.identifier(id) .identifier(id)
.build_uri(&uri) .build_uri(&uri)
.await .await
.and_then(|req| req.response())
{ {
// We use `1` here because we can't pass enums directly as GVariants, // We use `1` here because we can't pass enums directly as GVariants,
// so we need to use the C int value of the enum. // so we need to use the C int value of the enum.