Skip to content

Commit

Permalink
chore(user): Dissable offline mode
Browse files Browse the repository at this point in the history
  • Loading branch information
rzlnhd committed Dec 12, 2024
1 parent f0bb56a commit 5b6b59f
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions src/scripts/models/Users.js
Original file line number Diff line number Diff line change
Expand Up @@ -83,12 +83,12 @@ class Users extends GM_Library {
// const { id, name, pushname } = window.WAPI.Me;
this.phone = Number(id.user) || "";
this.name = name || pushname || "";
this.offlineData = {
phone: this.phone,
name: "WayFu Offline",
end: new Date("2024-12-14T17:00:00.000Z"),
type: "oriflame",
};
// this.offlineData = {
// phone: this.phone,
// name: "WayFu Offline",
// end: new Date("2024-12-14T17:00:00.000Z"),
// type: "oriflame",
// };

return this;
}
Expand Down Expand Up @@ -144,7 +144,7 @@ class Users extends GM_Library {
* @param {userData?} data User data as object
*/
setUser(data) {
const user = data || this.offlineData;
const user = data || this.getValue("wayfu-user");
if (user && typeof user !== "undefined" && user !== null && user !== "") {
this.reset().updateData(user).save();
options.setOption("userType", this.type);
Expand Down

0 comments on commit 5b6b59f

Please sign in to comment.