-
Notifications
You must be signed in to change notification settings - Fork 10
Fix freeze upon opening Credits tab #32
base: v0.1.x
Are you sure you want to change the base?
Conversation
| throw new NotImplementedException(); | ||
| using (var bytes = new MemoryStream(data)) | ||
| { | ||
| var channel = EnumProxy<ChannelType>.Deserialize(bytes); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: Indent the stuff properly.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is a pattern going on between Base*WebService and *WebService through abstract methods, it would be best that this implementation be implemented using the same pattern.
| } | ||
| using (var outBytes = new MemoryStream()) | ||
| { | ||
| EnumProxy<ChannelType>.Serialize(outBytes, channel); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The base class should not contain any hardcoded logic, instead rely on the abstract method's implementation.
| EnumProxy<ChannelType>.Serialize(outBytes, channel); | |
| List<BundleView> bundles = OnGetBundles(channel); | |
| ListProxy<BundleView>.Serialize(outBytes, bundles, BundleView.Serialize) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
BundleView does not contain definition for Serialize
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oops, apologies that should be BundleViewProxy.Serialize
FICTURE7
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me other than the hardcoded logic.
|
|
||
| private readonly UberStrikeItemShopClientView _items; | ||
| private readonly WebServiceContext _ctx; | ||
| private readonly List<BundleView> _bundles; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is not initialized, should be an empty list
| private readonly List<BundleView> _bundles; | |
| _bundles = new List<BundleView>(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do that somewhere in the constructor.
Make it so GetBundles returns something so it does not freeze the client when opening "Credits" tab in Shop