nx: play touch sound on sel manager viewer open
Signed-off-by: Varun Patil <radialapps@gmail.com>pull/653/head
parent
82251aa6ec
commit
804fbbe78e
|
@ -54,6 +54,7 @@ import { getCurrentUser } from '@nextcloud/auth';
|
|||
|
||||
import * as dav from '../services/DavRequests';
|
||||
import * as utils from '../services/Utils';
|
||||
import * as nativex from '../native';
|
||||
|
||||
import FaceMoveModal from './modal/FaceMoveModal.vue';
|
||||
import AddToAlbumModal from './modal/AddToAlbumModal.vue';
|
||||
|
@ -848,6 +849,7 @@ export default defineComponent({
|
|||
|
||||
/** Open viewer with given photo */
|
||||
openViewer(photo: IPhoto) {
|
||||
nativex.playTouchSound();
|
||||
this.$router.push(utils.getViewerRoute(photo));
|
||||
},
|
||||
},
|
||||
|
|
|
@ -27,6 +27,7 @@ export type NativeX = {
|
|||
isNative: () => boolean;
|
||||
setThemeColor: (color: string, isDark: boolean) => void;
|
||||
downloadFromUrl: (url: string, filename: string) => void;
|
||||
playTouchSound: () => void;
|
||||
|
||||
playVideoLocal: (fileid: string) => void;
|
||||
playVideoHls: (fileid: string, url: string) => void;
|
||||
|
@ -73,6 +74,13 @@ export async function downloadFromUrl(url: string) {
|
|||
nativex?.downloadFromUrl?.(addOrigin(url), filename);
|
||||
}
|
||||
|
||||
/**
|
||||
* Play touch sound.
|
||||
*/
|
||||
export async function playTouchSound() {
|
||||
nativex?.playTouchSound?.();
|
||||
}
|
||||
|
||||
/**
|
||||
* Play a video from the given file ID (local file).
|
||||
*/
|
||||
|
|
Loading…
Reference in New Issue