Skip to content

Commit d23b74d

Browse files
committed
Call storage probe from storage-client on language change
1 parent 59f358a commit d23b74d

File tree

2 files changed

+4
-11
lines changed

2 files changed

+4
-11
lines changed

rust/agama-storage-client/src/service.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -210,7 +210,9 @@ impl MessageHandler<message::SolveConfigModel> for Service {
210210
#[async_trait]
211211
impl MessageHandler<message::SetLocale> for Service {
212212
async fn handle(&mut self, message: message::SetLocale) -> Result<(), Error> {
213-
Ok(self.storage_proxy.set_locale(&message.locale).await?)
213+
self.storage_proxy.set_locale(&message.locale).await?;
214+
self.storage_proxy.probe().await?;
215+
Ok(())
214216
}
215217
}
216218

service/lib/agama/dbus/storage/manager.rb

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ def initialize(backend, logger: nil)
7171
dbus_method(:Install) { install }
7272
dbus_method(:Finish) { finish }
7373
dbus_method(:Umount) { umount }
74-
dbus_method(:SetLocale, "in locale:s") { |locale| configure_locale(locale) }
74+
dbus_method(:SetLocale, "in locale:s") { |locale| backend.configure_locale(locale) }
7575
dbus_method(
7676
:SetConfig, "in serialized_product_config:s, in serialized_config:s"
7777
) { |p, c| configure(p, c) }
@@ -120,15 +120,6 @@ def probe
120120
finish_progress
121121
end
122122

123-
# Changes the locale.
124-
#
125-
# If the system was already probed, probe it again in order to
126-
# refresh the actions, the list of issues, etc.
127-
def configure_locale(locale)
128-
backend.configure_locale(locale)
129-
probe if backend.probed?
130-
end
131-
132123
# Configures storage.
133124
#
134125
# The JSON schema supports two different variants:

0 commit comments

Comments
 (0)