aboutsummaryrefslogtreecommitdiffstats
path: root/config/converters.go
diff options
context:
space:
mode:
authorRobin Jarry <robin@jarry.cc>2023-02-02 00:48:51 +0100
committerRobin Jarry <robin@jarry.cc>2023-02-20 14:40:59 +0100
commit9fa296fb762231d386db88913d1c2ea521bd813c (patch)
tree445bf6554084bb37e6aed479c9942b5afecb2149 /config/converters.go
parent28483808727fd288b95b9dd26a716f6cf7c02b5a (diff)
downloadaerc-9fa296fb762231d386db88913d1c2ea521bd813c.tar.gz
templates: unify data interface
Require that all aerc template data objects implement the same TemplateData interface. Implement that interface in two different places: 1) state.TemplateData (renamed/moved from templates.TemplateData). This structure (along with all its methods) needs to be decoupled from the templates package to break the import cycle with the config package. This allows much simpler construction of this object and ensure that values are calculated only when requested. 2) config.dummyData (extracted from templates). This is only used in the config package to validate user templates. Putting it here allows also to break an import cycle. Use state.TemplateData everywhere (including for account tabs title rendering). Signed-off-by: Robin Jarry <robin@jarry.cc> Reviewed-by: Moritz Poldrack <moritz@poldrack.dev>
Diffstat (limited to 'config/converters.go')
0 files changed, 0 insertions, 0 deletions