Skip to content

Commit

Permalink
fix UI issues including transparency
Browse files Browse the repository at this point in the history
Based on the following commits:
reisxd/TizenTube@185f458
reisxd/TizenTube@8800d1f

Co-authored-by: reisxd <[email protected]>
  • Loading branch information
throwaway96 and reisxd committed Mar 25, 2024
1 parent 1581696 commit f5c6e9f
Showing 1 changed file with 42 additions and 0 deletions.
42 changes: 42 additions & 0 deletions src/ui.js
Original file line number Diff line number Diff line change
Expand Up @@ -207,3 +207,45 @@ export function showNotification(text, time = 3000) {
setTimeout(() => {
showNotification('Press [GREEN] to open YTAF configuration screen');
}, 2000);

function applyUIFixes() {
try {
const tc = window.tectonicConfig;
tc.clientData.legacyApplicationQuality = 'full-animation';
tc.featureSwitches.enableAnimations = true;
tc.featureSwitches.enableListAnimations = true;
tc.featureSwitches.enableOnScrollLinearAnimation = true;
tc.featureSwitches.isLimitedMemory = false;
} catch (e) {
console.error('error setting tectonicConfig:', e);
}

try {
const bodyClasses = document.body.classList;

const observer = new MutationObserver(function bodyClassCallback(
_records,
_observer
) {
try {
if (bodyClasses.contains('app-quality-root')) {
bodyClasses.remove('app-quality-root');
}
} catch (e) {
console.error('error in <body> class observer callback:', e);
}
});

observer.observe(document.body, {
subtree: false,
childList: false,
attributes: true,
attributeFilter: ['class'],
characterData: false
});
} catch (e) {
console.error('error setting up <body> class observer:', e);
}
}

applyUIFixes();

0 comments on commit f5c6e9f

Please sign in to comment.