mirror of
https://github.com/kidfromjupiter/nearby.git
synced 2026-09-14 14:46:12 -04:00
fixed accept hanging
This commit is contained in:
@@ -19,7 +19,7 @@ RowLayout {
|
||||
target: backend
|
||||
|
||||
function onStatusTextChanged() {
|
||||
console.log(backend.statusText);
|
||||
console.log("statusTextChanged: " + backend.statusText);
|
||||
}
|
||||
function onIncomingTransfer(share_target_id, device_name, status) {
|
||||
console.log("Getting incoming share");
|
||||
|
||||
@@ -307,9 +307,19 @@ std::tuple<bool, std::string> NearbySharingDbusService::SendFile(
|
||||
|
||||
std::tuple<bool, std::string> NearbySharingDbusService::Accept(
|
||||
const int64_t& share_target_id) {
|
||||
return InvokeStatusCommand([&](auto callback) {
|
||||
service_.Accept(share_target_id, std::move(callback));
|
||||
});
|
||||
LOG(INFO) << "Accept requested for target: " << share_target_id;
|
||||
|
||||
service_.Accept(
|
||||
share_target_id,
|
||||
[this, share_target_id](NearbySharingService::StatusCodes status) {
|
||||
LOG(INFO) << "Accept completed for target " << share_target_id
|
||||
<< " with status: "
|
||||
<< NearbySharingService::StatusCodeToString(status);
|
||||
|
||||
EmitStatusChanged();
|
||||
});
|
||||
|
||||
return {true, "accept requested"};
|
||||
}
|
||||
|
||||
std::tuple<bool, std::string> NearbySharingDbusService::Reject(
|
||||
|
||||
Reference in New Issue
Block a user