Make saved searches chronological

This commit is contained in:
Alejandro 2019-07-31 18:06:30 +03:00
parent 86b2e6be91
commit 4f5795e9d0
2 changed files with 6 additions and 5 deletions

View File

@ -50,7 +50,7 @@ public class HabboInfo implements Runnable {
private String photoJSON;
private int webPublishTimestamp;
private String machineID;
private HashSet<NavigatorSavedSearch> savedSearches = new HashSet<>();
private List<NavigatorSavedSearch> savedSearches = new ArrayList<>();
public HabboInfo(ResultSet set) {
try {
@ -125,7 +125,7 @@ public class HabboInfo implements Runnable {
}
private void loadSavedSearches() {
this.savedSearches = new HashSet<>();
this.savedSearches = new ArrayList<>();
try (Connection connection = Emulator.getDatabase().getDataSource().getConnection(); PreparedStatement statement = connection.prepareStatement("SELECT * FROM users_saved_searches WHERE user_id = ?")) {
statement.setInt(1, this.id);
@ -470,7 +470,7 @@ public class HabboInfo implements Runnable {
this.machineID = machineID;
}
public HashSet<NavigatorSavedSearch> getSavedSearches() {
public List<NavigatorSavedSearch> getSavedSearches() {
return this.savedSearches;
}

View File

@ -6,11 +6,12 @@ import com.eu.habbo.messages.outgoing.MessageComposer;
import com.eu.habbo.messages.outgoing.Outgoing;
import java.util.HashSet;
import java.util.List;
public class NewNavigatorSavedSearchesComposer extends MessageComposer {
private final HashSet<NavigatorSavedSearch> searches;
private final List<NavigatorSavedSearch> searches;
public NewNavigatorSavedSearchesComposer(HashSet<NavigatorSavedSearch> searches) {
public NewNavigatorSavedSearchesComposer(List<NavigatorSavedSearch> searches) {
this.searches = searches;
}