Small fixes
This commit is contained in:
parent
a54d0e4c0f
commit
043b06dedc
8 changed files with 2678 additions and 93 deletions
|
@ -117,7 +117,7 @@ class OpenSimPageState extends State<OpenSimPage> {
|
|||
SharedPreferences prefs = await SharedPreferences.getInstance();
|
||||
if (prefs.containsKey("settings")) {
|
||||
String encoded = prefs.getString("settings")!;
|
||||
CompoundTag tag = await NbtIo.readBase64String(encoded) as CompoundTag;
|
||||
CompoundTag tag = await NbtIo.readBase64String(encoded);
|
||||
if (tag.contains("user")) {
|
||||
settings.currentUser = User.load(tag.get("user") as CompoundTag);
|
||||
settings.loggedIn = true;
|
||||
|
@ -157,7 +157,7 @@ class OpenSimPageState extends State<OpenSimPage> {
|
|||
await showDialog(
|
||||
context: context,
|
||||
builder: (B) {
|
||||
return CreateInventoryPopup();
|
||||
return const CreateInventoryPopup();
|
||||
});
|
||||
activating = false;
|
||||
// Force user to re-login
|
||||
|
@ -188,7 +188,7 @@ class OpenSimPageState extends State<OpenSimPage> {
|
|||
padding: const EdgeInsets.all(8),
|
||||
child: SingleChildScrollView(
|
||||
child: polling
|
||||
? Column(
|
||||
? const Column(
|
||||
children: [
|
||||
ListTile(
|
||||
title: Text("Please wait... downloading content"),
|
||||
|
@ -236,7 +236,7 @@ class OpenSimPageState extends State<OpenSimPage> {
|
|||
|
||||
didChangeDependencies();
|
||||
},
|
||||
child: Text("LOGOUT"))
|
||||
child: const Text("LOGOUT"))
|
||||
],
|
||||
)
|
||||
: Center(
|
||||
|
@ -249,14 +249,14 @@ class OpenSimPageState extends State<OpenSimPage> {
|
|||
|
||||
didChangeDependencies();
|
||||
},
|
||||
child: Text("Login")),
|
||||
child: const Text("Login")),
|
||||
ElevatedButton(
|
||||
onPressed: () async {
|
||||
await Navigator.pushNamed(
|
||||
context, "/opensim/register");
|
||||
didChangeDependencies();
|
||||
},
|
||||
child: Text("Register Account"))
|
||||
child: const Text("Register Account"))
|
||||
],
|
||||
))
|
||||
],
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue