2
0
mirror of https://github.com/kotatogram/kotatogram-desktop synced 2025-09-07 01:55:12 +00:00

Use tr:: instead of Lang::Viewer.

This commit is contained in:
John Preston
2019-06-18 14:16:43 +02:00
parent f35085800a
commit 7af0dd105e
43 changed files with 483 additions and 511 deletions

View File

@@ -780,18 +780,21 @@ Instance &Current() {
return Core::App().langpack();
}
namespace details {
QString Current(LangKey key) {
return Current().getValue(key);
return Lang::Current().getValue(key);
}
rpl::producer<QString> Viewer(LangKey key) {
return rpl::single(
Current().getValue(key)
Lang::Current().getValue(key)
) | then(base::ObservableViewer(
Current().updated()
Lang::Current().updated()
) | rpl::map([=] {
return Current().getValue(key);
return Lang::Current().getValue(key);
}));
}
} // namespace details
} // namespace Lang