fix old toast patch to not re-create window

This commit is contained in:
AAGaming
2022-10-14 22:52:46 -04:00
parent 7445f066ed
commit bebe9428a6
+5 -1
View File
@@ -62,6 +62,10 @@ class Toaster extends Logger {
} }
return ret; return ret;
}); });
this.node.stateNode.shouldComponentUpdate = () => {
return false;
};
delete this.node.stateNode.render;
} }
return ret; return ret;
}; };
@@ -102,7 +106,7 @@ class Toaster extends Logger {
deinit() { deinit() {
this.instanceRetPatch?.unpatch(); this.instanceRetPatch?.unpatch();
this.node && delete this.node.stateNode.render; this.node && delete this.node.stateNode.shouldComponentUpdate;
this.node && this.node.stateNode.forceUpdate(); this.node && this.node.stateNode.forceUpdate();
} }
} }