Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
alainm23 committed Dec 16, 2024
1 parent e5ad2a4 commit 87f440e
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 8 deletions.
16 changes: 12 additions & 4 deletions src/Backends/SystemUpdate.vala
Original file line number Diff line number Diff line change
Expand Up @@ -191,8 +191,12 @@ public class SettingsDaemon.Backends.SystemUpdate : Object {
}

private void progress_callback (Pk.Progress progress, Pk.ProgressType progress_type) {
update_state (current_state.state, PkUtils.status_to_title (progress.status),
progress.percentage, progress.download_size_remaining);
update_state (
current_state.state,
PkUtils.status_to_title (progress.status),
progress.percentage,
progress.download_size_remaining
);
}

private void send_error (string message) {
Expand All @@ -206,8 +210,12 @@ public class SettingsDaemon.Backends.SystemUpdate : Object {
update_state (ERROR, message);
}

private void update_state (PkUtils.State state, string message = "",
uint percentage = 0, uint64 download_size_remaining = 0) {
private void update_state (
PkUtils.State state,
string message = "",
uint percentage = 0,
uint64 download_size_remaining = 0
) {
current_state = {
state,
message,
Expand Down
16 changes: 12 additions & 4 deletions src/Backends/UbuntuDrivers.vala
Original file line number Diff line number Diff line change
Expand Up @@ -262,8 +262,12 @@ public class SettingsDaemon.Backends.UbuntuDrivers : Object {
}

private void progress_callback (Pk.Progress progress, Pk.ProgressType progress_type) {
update_state (current_state.state, PkUtils.status_to_title (progress.status),
progress.percentage, progress.download_size_remaining);
update_state (
current_state.state,
PkUtils.status_to_title (progress.status),
progress.percentage,
progress.download_size_remaining
);
}

private void send_error (string message) {
Expand All @@ -277,8 +281,12 @@ public class SettingsDaemon.Backends.UbuntuDrivers : Object {
update_state (ERROR, message);
}

private void update_state (PkUtils.State state, string message = "",
uint percentage = 0, uint64 download_size_remaining = 0) {
private void update_state (
PkUtils.State state,
string message = "",
uint percentage = 0,
uint64 download_size_remaining = 0
) {
current_state = {
state,
message,
Expand Down

0 comments on commit 87f440e

Please sign in to comment.