kasketis / netfox

A lightweight, one line setup, iOS / OSX network debugging library! 🦊
MIT License
3.68k stars 374 forks source link

Add clear capability to list view controller #147

Closed nunogoncalves closed 5 years ago

nunogoncalves commented 5 years ago

Hi,

I use Netfox fairly extensively. This is a shortcut that makes so much sense to me. I'm opening this PR to see if you guys like it (in that case will fix any issues you'd like). Right now the code is duplicated, but if you prefer I can try to "dry" it and any other issue you might want. If you don't like for some reason, let me know to avoid doing anything wrong, but I'll probably start using my fork with this feature. Thank you!

Here's an image displaying the behavour:

ghost commented 5 years ago

Good job. I would be glad to use this.

felipeflorencio commented 5 years ago

Hey @nunogoncalves nice that you manage, but indeed, it's a duplicated code, I just looked in order to proceed with the merge, can you update in order to not have a duplicated code?

It should be the " func clearDataButtonPressedOnTableIndex( index: IndexPath)" generic , could be rename the method to " func clearDataButtonPressed( index: IndexPath? = nil )", and inside you make the validation, if I have an index do what need and if not go with your implementation.

When finish I will see and if fine we proceed with the pull request! Tnx for helping 💃

nunogoncalves commented 5 years ago

Hi @felipeflorencio thanks for your answer.

I updated the PR, but maybe this is going to require some more discussion. I didn't see a great place to add this to, so I created a protocol in Utils file and added a default implementation with it. Let me know your thoughts, and if you don't like it, where do you think I should put it?

felipeflorencio commented 5 years ago

Changed merged, I just waiting for access to publish the pod :D soon I get will be available there, tnx for helping and supporting :D.

felipeflorencio commented 5 years ago

@nunogoncalves Done already published 👍

nunogoncalves commented 5 years ago

Thank you! That was fast! Considering other OS experiences I had, this was supah fast! :D Thanks again