Remove toast when stopping background positioning

Hide OptiFine part on start screen again
This commit is contained in:
JannisX11 2021-03-20 20:55:57 +01:00
parent 11f992e68e
commit 2b422332a0
2 changed files with 6 additions and 2 deletions

View File

@ -218,7 +218,7 @@ var part_format = new ModelFormat({
id: 'optifine_part',
extension: 'jpm',
icon: 'icon-format_optifine',
//show_on_start_screen: false,
show_on_start_screen: false,
single_texture: true,
integer_size: true,
rotate_cubes: true,

View File

@ -957,7 +957,7 @@ class Preview {
this.controls.enabled_before = this.controls.enabled
this.controls.enabled = false
Blockbench.showToastNotification({
this.position_toast = Blockbench.showToastNotification({
text: 'message.drag_background',
icon: 'open_with',
click: () => {
@ -970,6 +970,10 @@ class Preview {
this.movingBackground = false;
this.controls.enabled = this.controls.enabled_before
delete this.controls.enabled_before
if (this.position_toast) {
this.position_toast.delete();
delete this.position_toast;
}
Settings.saveLocalStorages()
return this;
}