Skip to content

Commit

Permalink
fix: clipboard doesn't work and set_shadow method is not supported …
Browse files Browse the repository at this point in the history
…in Linux (#1030)
  • Loading branch information
oomeow committed May 18, 2024
1 parent b25cf5e commit db5d14e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src-tauri/src/utils/resolve.rs
Original file line number Diff line number Diff line change
Expand Up @@ -193,11 +193,11 @@ pub fn create_window(app_handle: &AppHandle) {
}
Ok(center)
})();

if center.unwrap_or(true) {
trace_err!(win.center(), "set win center");
}

#[cfg(not(target_os = "linux"))]
trace_err!(set_shadow(&win, true), "set win shadow");
if is_maximized {
trace_err!(win.maximize(), "set win maximize");
Expand Down
3 changes: 2 additions & 1 deletion src/pages/profiles.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ import { atomThemeMode } from "@/services/states";
import { BaseStyledTextField } from "@/components/base/base-styled-text-field";
import { listen } from "@tauri-apps/api/event";
import { readTextFile } from "@tauri-apps/api/fs";
import { readText } from "@tauri-apps/api/clipboard";

const ProfilePage = () => {
const { t } = useTranslation();
Expand Down Expand Up @@ -267,7 +268,7 @@ const ProfilePage = () => {
});

const onCopyLink = async () => {
const text = await navigator.clipboard.readText();
const text = await readText();
if (text) setUrl(text);
};
const [mode] = useRecoilState(atomThemeMode);
Expand Down

0 comments on commit db5d14e

Please sign in to comment.