Apply OT region fix to web app

This commit is contained in:
Brahim Hadriche committed 2024-05-04 00:18:31 -04:00
1 parent 30a75dc229
commit 1606ea9e2c
3 files changed
+16 -2

No files matched your search

+6
View File
@@ -5,6 +5,12 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
## [Unreleased]
### Fixed
- a bug where trending and search wouldn't work in certain countries (web app)
## [0.23.4] - 2024-05-04
### Added
@@ -31,7 +31,11 @@
playletStateStore.subscribe((value) => {
invidiousApi.instance = value?.invidious?.current_instance;
invidiousApi.userCountryCode = value?.device?.user_country_code ?? "US";
let userCountryCode = value?.device?.user_country_code;
if (!userCountryCode || userCountryCode === "OT") {
userCountryCode = "US";
}
invidiousApi.userCountryCode = userCountryCode;
});
searchHistoryStore.subscribe((value) => {
@@ -83,7 +83,11 @@
playletStateStore.subscribe((value) => {
invidiousApi.instance = value?.invidious?.current_instance;
invidiousApi.userCountryCode = value?.device?.user_country_code ?? "US";
let userCountryCode = value?.device?.user_country_code;
if (!userCountryCode || userCountryCode === "OT") {
userCountryCode = "US";
}
invidiousApi.userCountryCode = userCountryCode;
invidiousApi.isLoggedIn = !!(value.profiles?.currentProfile ?? false);
loadRow();
});