fix media autoload button function as per it's label (#2195)
authorArray in a Matrix <github@arrayinamatrix.xyz>
Tue, 11 Feb 2025 05:28:46 +0000 (21:28 -0800)
committerGitHub <noreply@github.com>
Tue, 11 Feb 2025 05:28:46 +0000 (16:28 +1100)
* Corrected button title

Media would load automatically if the option is checked not the other way around.

* Update src/app/features/settings/general/General.tsx

* Update General.tsx

* Update General.tsx

---------

Co-authored-by: Krishan <33421343+kfiven@users.noreply.github.com>
src/app/features/settings/general/General.tsx

index abbfda909e4e95295fed9b86dbdd152e08053bfc..d58c99caf30347e04ca1588c13b193f7a0ba6f49 100644 (file)
@@ -555,7 +555,7 @@ function Messages() {
       <SequenceCard className={SequenceCardStyle} variant="SurfaceVariant" direction="Column">
         <SettingTile
           title="Disable Media Auto Load"
-          after={<Switch variant="Primary" value={mediaAutoLoad} onChange={setMediaAutoLoad} />}
+          after={<Switch variant="Primary" value={!mediaAutoLoad} onChange={(v) => setMediaAutoLoad(!v)} />}
         />
       </SequenceCard>
       <SequenceCard className={SequenceCardStyle} variant="SurfaceVariant" direction="Column">