From 16d986069f39ccf93d0d98d359547aba71b3d6c8 Mon Sep 17 00:00:00 2001 From: khanhduytran0 Date: Sat, 2 Sep 2023 05:53:42 +0700 Subject: [PATCH] Fix[Forge installer]: crash if load during scroll Misc fixes: - JavaGUIViewController.m: change text to empty after pressing return - FabricInstallViewController.m: change Beta to Unstable --- Natives/JavaGUIViewController.m | 2 +- Natives/installer/FabricInstallViewController.m | 4 ++-- Natives/installer/ForgeInstallViewController.m | 1 + Natives/resources/en.lproj/Localizable.strings | 1 + 4 files changed, 5 insertions(+), 3 deletions(-) diff --git a/Natives/JavaGUIViewController.m b/Natives/JavaGUIViewController.m index 73406154..8c4fa708 100644 --- a/Natives/JavaGUIViewController.m +++ b/Natives/JavaGUIViewController.m @@ -398,7 +398,7 @@ dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{ - (BOOL)textFieldShouldReturn:(UITextField *)textField { self.inputTextField.sendKey(GLFW_KEY_ENTER, 0, 1, 0); //self.inputTextField.sendKey(GLFW_KEY_ENTER, 0, 0, 0); - textField.text = @" "; + textField.text = @""; return YES; } diff --git a/Natives/installer/FabricInstallViewController.m b/Natives/installer/FabricInstallViewController.m index 45173db8..aef88cbe 100644 --- a/Natives/installer/FabricInstallViewController.m +++ b/Natives/installer/FabricInstallViewController.m @@ -87,8 +87,8 @@ @"icon": @"ladybug", @"title": @"preference.profile.title.loader_type", @"type": typePickSegment, - @"pickList": @[localize(@"Release", nil), @"Beta"], - //localize(@"Beta", nil) + @"pickList": @[localize(@"Release", nil), @"Unstable"], + //localize(@"Unstable", nil) @"action": ^(int type) { [weakSelf changeLoaderTypeTo:type]; } diff --git a/Natives/installer/ForgeInstallViewController.m b/Natives/installer/ForgeInstallViewController.m index 2ada480e..027d4c85 100644 --- a/Natives/installer/ForgeInstallViewController.m +++ b/Natives/installer/ForgeInstallViewController.m @@ -105,6 +105,7 @@ [self.visibilityList removeAllObjects]; [self.versionList removeAllObjects]; [self.forgeList removeAllObjects]; + [self.tableView reloadData]; switch (segment.selectedSegmentIndex) { case 0: [self loadForgeMetadata]; diff --git a/Natives/resources/en.lproj/Localizable.strings b/Natives/resources/en.lproj/Localizable.strings index 87a957f3..bb4f6cab 100644 --- a/Natives/resources/en.lproj/Localizable.strings +++ b/Natives/resources/en.lproj/Localizable.strings @@ -19,6 +19,7 @@ "Installed" = "Installed"; "Snapshot" = "Snapshot"; "Releases" = "Releases"; +"Unstable" = "Unstable"; "Old-beta" = "Old-beta"; "Old-alpha" = "Old-alpha";