Skip to content

Commit

Permalink
Code review
Browse files Browse the repository at this point in the history
  • Loading branch information
JustArchi committed Feb 24, 2016
1 parent a528dee commit 44a595c
Show file tree
Hide file tree
Showing 7 changed files with 115 additions and 126 deletions.
20 changes: 5 additions & 15 deletions ArchiSteamFarm/ArchiHandler.cs
Original file line number Diff line number Diff line change
Expand Up @@ -205,8 +205,10 @@ internal AsyncJob<PurchaseResponseCallback> RedeemKey(string key) {
return null;
}

var request = new ClientMsgProtobuf<CMsgClientRegisterKey>(EMsg.ClientRegisterKey);
request.SourceJobID = Client.GetNextJobID();
var request = new ClientMsgProtobuf<CMsgClientRegisterKey>(EMsg.ClientRegisterKey) {
SourceJobID = Client.GetNextJobID()
};

request.Body.key = key;

Client.Send(request);
Expand All @@ -222,7 +224,7 @@ _ _ _ _
*/

public sealed override void HandleMsg(IPacketMsg packetMsg) {
public override void HandleMsg(IPacketMsg packetMsg) {
if (packetMsg == null) {
return;
}
Expand All @@ -246,10 +248,6 @@ private void HandleFSOfflineMessageNotification(IPacketMsg packetMsg) {
}

var response = new ClientMsgProtobuf<CMsgClientOfflineMessageNotification>(packetMsg);
if (response == null) {
return;
}

Client.PostCallback(new OfflineMessageCallback(packetMsg.TargetJobID, response.Body));
}

Expand All @@ -259,10 +257,6 @@ private void HandlePurchaseResponse(IPacketMsg packetMsg) {
}

var response = new ClientMsgProtobuf<CMsgClientPurchaseResponse>(packetMsg);
if (response == null) {
return;
}

Client.PostCallback(new PurchaseResponseCallback(packetMsg.TargetJobID, response.Body));
}

Expand All @@ -272,10 +266,6 @@ private void HandleUserNotifications(IPacketMsg packetMsg) {
}

var response = new ClientMsgProtobuf<CMsgClientUserNotifications>(packetMsg);
if (response == null) {
return;
}

Client.PostCallback(new NotificationsCallback(packetMsg.TargetJobID, response.Body));
}
}
Expand Down
Loading

0 comments on commit 44a595c

Please sign in to comment.