@@ -334,16 +334,21 @@ void DeviceBridge::install_app(instproxy_client_t& installer, afc_client_t &afc,
334334 emit InstallerStatusChanged (InstallerMode::CMD_INSTALL , bundleidentifier, 51 , " Installing " + QString (bundleidentifier));
335335 instproxy_install (installer, pkgname.toUtf8 ().data (), client_opts, InstallerCallback, NULL );
336336 } else {
337- emit InstallerStatusChanged (InstallerMode::CMD_INSTALL , bundleidentifier, 51 , " Upgrading " + QString (bundleidentifier));
337+ emit InstallerStatusChanged (InstallerMode::CMD_UPGRADE , bundleidentifier, 51 , " Upgrading " + QString (bundleidentifier));
338338 instproxy_upgrade (installer, pkgname.toUtf8 ().data (), client_opts, InstallerCallback, NULL );
339339 }
340340 instproxy_client_options_free (client_opts);
341341}
342342
343343void DeviceBridge::TriggetInstallerStatus (QJsonDocument command, QJsonDocument status)
344344{
345- InstallerMode pCommand = command[" Command" ].toString () == " Install" ? InstallerMode::CMD_INSTALL : InstallerMode::CMD_UNINSTALL ;
346- QString pBundleId = pCommand == InstallerMode::CMD_INSTALL ? command[" ClientOptions" ][" CFBundleIdentifier" ].toString () : command[" ApplicationIdentifier" ].toString ();
345+ InstallerMode pCommand = InstallerMode::CMD_UNINSTALL ;
346+ if (command[" Command" ].toString () == " Install" )
347+ pCommand = InstallerMode::CMD_INSTALL ;
348+ else if (command[" Command" ].toString () == " Upgrade" )
349+ pCommand = InstallerMode::CMD_UPGRADE ;
350+
351+ QString pBundleId = pCommand == InstallerMode::CMD_UNINSTALL ? command[" ApplicationIdentifier" ].toString () : command[" ClientOptions" ][" CFBundleIdentifier" ].toString ();
347352
348353 int percentage = 0 ;
349354 QString pMessage = status[" Status" ].toString ();
0 commit comments