@@ -11,6 +11,7 @@ import fonts from "lib/fonts";
1111import appSettings from "lib/settings" ;
1212import FileBrowser from "pages/fileBrowser" ;
1313import helpers from "utils/helpers" ;
14+ import confirm from "dialogs/confirm" ;
1415
1516export default function terminalSettings ( ) {
1617 const title = strings [ "terminal settings" ] ;
@@ -188,7 +189,7 @@ export default function terminalSettings() {
188189 * @param {string } key
189190 * @param {string } value
190191 */
191- function callback ( key , value ) {
192+ async function callback ( key , value ) {
192193 switch ( key ) {
193194 case "all_file_access" :
194195 if ( ANDROID_SDK_INT >= 30 ) {
@@ -213,11 +214,13 @@ export default function terminalSettings() {
213214 return ;
214215
215216 case "uninstall" :
216- loader . showTitleLoader ( ) ;
217- Terminal . uninstall ( )
218- . then ( ( ) => {
219- loader . removeTitleLoader ( ) ;
220- alert (
217+ const confirmation = await confirm ( strings . confirm , "Are you sure you want to uninstall the terminal?" ) ;
218+ if ( confirmation ) {
219+ loader . showTitleLoader ( ) ;
220+ Terminal . uninstall ( )
221+ . then ( ( ) => {
222+ loader . removeTitleLoader ( ) ;
223+ alert (
221224 strings . success . toUpperCase ( ) ,
222225 "Terminal uninstalled successfully." ,
223226 ) ;
@@ -227,6 +230,7 @@ export default function terminalSettings() {
227230 console . error ( "Terminal uninstall failed:" , error ) ;
228231 helpers . error ( error ) ;
229232 } ) ;
233+ }
230234 return ;
231235
232236 default :
0 commit comments