Sprawdzone lokalizacje w Historii cen zapisane na koncie
Deploy Polska Lokalnie / deploy (push) Successful in 12s
Deploy Polska Lokalnie / deploy (push) Successful in 12s
Lista ostatnio sprawdzonych lokalizacji zyla w localStorage, wiec ginela przy zmianie urzadzenia. Teraz jest polem ustawien konta (user_settings.price_history_markets), a wpisy z przegladarki przenosimy raz przy pierwszym wejsciu. To historia przegladania, nie alerty - nic z niej nie wysyla powiadomien. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -114,6 +114,14 @@ public class UserSettings {
|
||||
@ColumnDefault("false")
|
||||
private boolean notifyProductNews = false;
|
||||
|
||||
/**
|
||||
* Lokalizacje ostatnio sprawdzone w Historii cen (JSON, maks. kilka pozycji). Lista jest
|
||||
* na koncie, a nie w przegladarce, wiec porownanie cen wyglada tak samo na kazdym urzadzeniu.
|
||||
* To zwykla historia przegladania - nie ma z nia zwiazanych zadnych powiadomien.
|
||||
*/
|
||||
@Column(name = "price_history_markets", columnDefinition = "text")
|
||||
private String priceHistoryMarkets;
|
||||
|
||||
// --- Preferencje wyszukiwania (podpowiadane przy filtrowaniu ofert) ---
|
||||
|
||||
@Column(length = 255)
|
||||
@@ -314,6 +322,14 @@ public class UserSettings {
|
||||
return searchLocations;
|
||||
}
|
||||
|
||||
public String getPriceHistoryMarkets() {
|
||||
return priceHistoryMarkets;
|
||||
}
|
||||
|
||||
public void setPriceHistoryMarkets(String priceHistoryMarkets) {
|
||||
this.priceHistoryMarkets = priceHistoryMarkets;
|
||||
}
|
||||
|
||||
public void setSearchLocations(String searchLocations) {
|
||||
this.searchLocations = searchLocations;
|
||||
}
|
||||
|
||||
@@ -25,6 +25,7 @@ public record UserSettingsRequest(
|
||||
Boolean notifyPriceAlerts,
|
||||
Boolean notifyMessages,
|
||||
Boolean notifyProductNews,
|
||||
String priceHistoryMarkets,
|
||||
String searchLocations,
|
||||
String searchPropertyType,
|
||||
Integer searchBudgetMax,
|
||||
|
||||
@@ -22,6 +22,7 @@ public record UserSettingsResponse(
|
||||
boolean notifyPriceAlerts,
|
||||
boolean notifyMessages,
|
||||
boolean notifyProductNews,
|
||||
String priceHistoryMarkets,
|
||||
String searchLocations,
|
||||
String searchPropertyType,
|
||||
Integer searchBudgetMax,
|
||||
@@ -52,6 +53,7 @@ public record UserSettingsResponse(
|
||||
settings.isNotifyPriceAlerts(),
|
||||
settings.isNotifyMessages(),
|
||||
settings.isNotifyProductNews(),
|
||||
settings.getPriceHistoryMarkets(),
|
||||
settings.getSearchLocations(),
|
||||
settings.getSearchPropertyType(),
|
||||
settings.getSearchBudgetMax(),
|
||||
|
||||
@@ -135,6 +135,10 @@ public class UserSettingsService {
|
||||
if (request.notifyProductNews() != null) {
|
||||
settings.setNotifyProductNews(request.notifyProductNews());
|
||||
}
|
||||
if (request.priceHistoryMarkets() != null) {
|
||||
String markets = request.priceHistoryMarkets().trim();
|
||||
settings.setPriceHistoryMarkets(markets.isEmpty() ? null : markets);
|
||||
}
|
||||
if (request.searchLocations() != null) {
|
||||
String locations = request.searchLocations().trim();
|
||||
textModerationService.validateOrThrow(locations);
|
||||
|
||||
Reference in New Issue
Block a user