apprt/gtk-ng: some style changes for toast

This commit is contained in:
Mitchell Hashimoto
2025-08-23 12:51:50 -07:00
parent 1b8dd234b0
commit e1d4c37996

View File

@@ -961,16 +961,14 @@ pub const Window = extern struct {
_: *gobject.ParamSpec,
self: *Self,
) callconv(.c) void {
// We only toast if configured to
const priv = self.private();
const config_obj = priv.config orelse {
self.syncAppearance();
return;
};
const config = config_obj.get();
if (config.@"app-notifications".@"config-reload") {
self.addToast(i18n._("Reloaded the configuration"));
if (priv.config) |config_obj| {
const config = config_obj.get();
if (config.@"app-notifications".@"config-reload") {
self.addToast(i18n._("Reloaded the configuration"));
}
}
self.syncAppearance();
}