@@ -12,6 +12,7 @@ use std::process;
1212
1313use clap:: Parser ;
1414use matrix_sdk:: authentication:: matrix:: MatrixSession ;
15+ use matrix_sdk:: media:: MediaRetentionPolicy ;
1516use matrix_sdk:: ruma:: { OwnedDeviceId , OwnedRoomAliasId , OwnedRoomId , OwnedUserId , UserId } ;
1617use ratatui:: style:: { Color , Modifier as StyleModifier , Style } ;
1718use ratatui:: text:: Span ;
@@ -584,6 +585,7 @@ pub struct TunableValues {
584585 pub user_gutter_width : usize ,
585586 pub external_edit_file_suffix : String ,
586587 pub tabstop : usize ,
588+ pub cache_policy : MediaRetentionPolicy ,
587589}
588590
589591#[ derive( Clone , Default , Deserialize ) ]
@@ -612,6 +614,7 @@ pub struct Tunables {
612614 pub user_gutter_width : Option < usize > ,
613615 pub external_edit_file_suffix : Option < String > ,
614616 pub tabstop : Option < usize > ,
617+ pub cache_policy : Option < MediaRetentionPolicy > ,
615618}
616619
617620impl Tunables {
@@ -646,6 +649,7 @@ impl Tunables {
646649 . external_edit_file_suffix
647650 . or ( other. external_edit_file_suffix ) ,
648651 tabstop : self . tabstop . or ( other. tabstop ) ,
652+ cache_policy : self . cache_policy . or ( other. cache_policy ) ,
649653 }
650654 }
651655
@@ -676,6 +680,7 @@ impl Tunables {
676680 . external_edit_file_suffix
677681 . unwrap_or_else ( || ".md" . to_string ( ) ) ,
678682 tabstop : self . tabstop . unwrap_or ( 4 ) ,
683+ cache_policy : self . cache_policy . unwrap_or_default ( ) ,
679684 }
680685 }
681686}
0 commit comments