chore: cargo fmt
This commit is contained in:
parent
990e2e291b
commit
cb288070af
3 changed files with 12 additions and 3 deletions
|
|
@ -692,7 +692,9 @@ impl Theme {
|
|||
let is_dark = ThemeMode::is_dark(&config).map_err(|e| (vec![e], Self::default()))?;
|
||||
Self::get_active_with_brightness(is_dark)
|
||||
}
|
||||
pub fn get_active_with_brightness(is_dark: bool) -> Result<Self, (Vec<cosmic_config::Error>, Self)> {
|
||||
pub fn get_active_with_brightness(
|
||||
is_dark: bool,
|
||||
) -> Result<Self, (Vec<cosmic_config::Error>, Self)> {
|
||||
let config = if is_dark {
|
||||
Self::dark_config()
|
||||
} else {
|
||||
|
|
|
|||
|
|
@ -48,7 +48,11 @@ pub fn toggle_maximize<M>(id: window::Id) -> iced::Task<crate::Action<M>> {
|
|||
}
|
||||
|
||||
#[cfg(feature = "xdg-portal")]
|
||||
pub fn file_transfer_send(writeable: bool, auto_stop: bool, files: Vec<impl AsFd + Send + Sync + 'static>) -> iced::Task<ashpd::Result<String>> {
|
||||
pub fn file_transfer_send(
|
||||
writeable: bool,
|
||||
auto_stop: bool,
|
||||
files: Vec<impl AsFd + Send + Sync + 'static>,
|
||||
) -> iced::Task<ashpd::Result<String>> {
|
||||
iced::Task::future(async move {
|
||||
let file_transfer = ashpd::documents::FileTransfer::new().await?;
|
||||
let key = file_transfer.start_transfer(writeable, auto_stop).await?;
|
||||
|
|
|
|||
|
|
@ -522,7 +522,10 @@ impl<Message: 'static> Widget<Message, crate::Theme, crate::Renderer>
|
|||
);
|
||||
|
||||
#[cfg(feature = "xdg-portal")]
|
||||
if mime_type == FILE_TRANSFER_MIME && let Some(f) = self.on_file_transfer.as_ref() && let Ok(s) = String::from_utf8(data[..data.len() - 1].to_vec()) {
|
||||
if mime_type == FILE_TRANSFER_MIME
|
||||
&& let Some(f) = self.on_file_transfer.as_ref()
|
||||
&& let Ok(s) = String::from_utf8(data[..data.len() - 1].to_vec())
|
||||
{
|
||||
shell.publish(f(s));
|
||||
return event::Status::Captured;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue