#2168 closed defect (fixed)

I2PSnark: Fix a [very] minor bug and "Modernize" folder.js

Reported by: Pimp Trizkit Owned by: zzz
Priority: trivial Milestone: 0.9.34
Component: apps/i2psnark Version: 0.9.33
Keywords: folder.js setupbuttons updatesetallbuttons Cc:
Parent Tickets: Sensitive: no

Description

Probably a continuation of the work here: #1376 closed enhancement (fixed)
(possibly its parent?)

See GitHub? pull request for a full write up. ( https://github.com/i2p/i2p.i2p/pull/14 )


Issue:

When viewing the info screen of a torrent which has only folders and no files at the root. There is an error in the console. As there are no priority buttons to setup but the "setupbuttons" function is being called anyway. Very inconsequential, as there is no further code to run.


Fix:

So I just added an IF to prevent the crash, making these functions softer. I'm just trying to get my feet wet here with the community. Let me know if I'm off my rocker here. I hope to help; even tho this one is really nothing much.


Test:

My project with this new folder.js is compiled and running on my instance of i2p. I spent at least 3 minutes clicking radios and buttons to fully test all cases. Seems to all work well. (…But found another unrelated minor/trivial bug… lol)


Extra:

Also, you will see at GitHub?, I took a chance to tune-up a few things, if that sort of thing is desired. Lighter-weight, faster, smaller… all that sorta thing. However, in some places, a loss of readability. While in others, possibly, a gain. (to me, concise code is more readable, in some places, imho) I understand this file is inconsequential in these matters. I'm just testing my ideas with you guys. Thoughts?


Finally, sorry for the wall of text but I'm not sure of the preferred method of posting these fixes. Let me know what I can do better / more correctly.

PT

(I also think I might have a legit issue with building/ant/compiling, should I post that here? I can't seem to find peeps with the info on IRC, maybe I should try the boards first)

Subtickets

Change History (4)

comment:1 Changed 22 months ago by zzz

Milestone: undecided0.9.34
Status: newaccepted

Thanks. As you can see, we are not very good js people. Will test and find somebody to review it.

If you can't get your build questions answered in IRC #i2p, ask in #i2p-dev, or on zzz.i2p. Please don't ask for help in trac tickets. Those are also good places to talk about the best ways to work together.

comment:2 Changed 22 months ago by Pimp Trizkit

Thank you for your reply!

Yes, I didn't think this was the place to generally ask questions. But I looked into it, and the build question seems like an actual issue/bug. I will continue to look for peeps on IRC that might have info.

Sorry for all the text… but are fixes and tune-ups like this desired? or am I stepping on toes and stuff here?

PT

comment:3 Changed 22 months ago by zzz

we need all the help we can get!

comment:4 Changed 22 months ago by zzz

Resolution: fixed
Status: acceptedclosed
Note: See TracTickets for help on using tickets.