mirror of
https://github.com/redphx/better-xcloud.git
synced 2025-06-07 08:07:18 +02:00
Only show toast when the layout has been changed
This commit is contained in:
parent
a878150ec3
commit
6b090194c9
@ -3553,6 +3553,8 @@ class TouchController {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const layoutChanged = TouchController.#currentLayoutId !== layoutId;
|
||||||
|
|
||||||
TouchController.#currentLayoutId = layoutId;
|
TouchController.#currentLayoutId = layoutId;
|
||||||
xboxTitleId = '' + xboxTitleId;
|
xboxTitleId = '' + xboxTitleId;
|
||||||
|
|
||||||
@ -3566,7 +3568,7 @@ class TouchController {
|
|||||||
const layout = (layoutData.layouts[layoutId] || layoutData.layouts[layoutData.default_layout]);
|
const layout = (layoutData.layouts[layoutId] || layoutData.layouts[layoutData.default_layout]);
|
||||||
if (layout) {
|
if (layout) {
|
||||||
// Show a toast with layout's name
|
// Show a toast with layout's name
|
||||||
Toast.show(__('touch-control-layout'), layout.name);
|
layoutChanged && Toast.show(__('touch-control-layout'), layout.name);
|
||||||
|
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
window.BX_EXPOSED.touch_layout_manager.changeLayoutForScope({
|
window.BX_EXPOSED.touch_layout_manager.changeLayoutForScope({
|
||||||
|
Loading…
x
Reference in New Issue
Block a user