InSteem app update:pictures in comments (so unique right?), bug fixes (nasty large cockroaches) and performance improvements
utopian-io·@hispeedimagins·
0.000 HBDInSteem app update:pictures in comments (so unique right?), bug fixes (nasty large cockroaches) and performance improvements
 #### Repository https://github.com/hispeedimagins/steem <hr style="color:blue;background-color:blue;border-color:blue"> [InSteem](https://play.google.com/store/apps/details?id=com.insteem.ipfreely.steem) is and will remain the first native android app which is and will be forever completely free for the people to use. Take a look at the utopian task and get me some icons. [Task request](https://steemit.com/utopian-io/@utopian.tasks/task-request-graphics-steemer-rebranding) ### Why free? Because @steemit needs it. A quick way to interact with the blockchain. One that will not eat into the users rewards. <hr/> ## New Features ### pictures in comments (finally) Posting to the blockchain with images was a feature which was added a long time back. But InSteem did not have the ability to post pictures in a comment. Something which comes in use when you add that funny image at the right time. That has now been added to the app. To facilitate this a lot of code was moved from the post activity into a static class. Then used as a common function between the comment modal sheet and the post activity. So the ui and everything else used to upload the image remains the same across the app and easy to maintain. Some small amount of code has been copied again but will made common too once some testing is done on it's impact. The dialogue now opens just like the post dialogue which allows either uploading from the gallery or by taking an image from the camera. In the future we can add more options easily.  and the result  Some code was also written to route the progress bar and textview from the modal sheet either from the comments recyclerview or the article view to the article activity where they are stored in a variable, then updated with the image link once it is uploaded to steemit servers. A big thank you to steemit. This routing is needed as I have made modal sheet for comments stateless and not a singleton. It is created when needed and then destroyed. This also saves ram, the time of clearing the textviews and updating the ui each time. #### commits 1. [commit](https://github.com/hispeedimagins/steem/commit/a2ba076366a0d5cd54d00d9b13ef36a4ad913095) <hr/> ## Bug fixes & performance improvements ### Fix a bug where app would crash while loading tags which do not exist The app would crash if a user searched for a bug which did not exist. This was because while paring the result json we would expect the result object to be of the type array but it was of the type object if the tag did not exist or some other error occurred and would contain the resultant error as an object as well. With this line of code we check if it is an object ``` val res = body.get("result") if(res is JSONObject){ ``` if it is an object then the error is extracted out and displayed to the user via an interface. #### commits 1. [commit](https://github.com/hispeedimagins/steem/commit/1aa174d1380aa02ac50c52da619d11990c126bd5) <hr/> ### Fix a bug where favourites would crash and nonce value set too high would crash the app Favorites would crash while opening because a data object would not be set, this is now checked if not null and only then processed. If the nonce value for signing in settings was set to too high, this would crash the app while signing. This is now limited to 5 characters. 10000 is the limit for the nonce value now. #### commits 1. [commit](https://github.com/hispeedimagins/steem/commit/7ed969c20c8b3435c5319007781ea28444c07b7b) <hr/> ### Fix a bug where loading a profile would crash the app Loading the profile would crash the app because the json model had some fields marked as int because they were 0 for my profile but others had a different value for those fields and their type was actually long. These are now fixed. #### commits 1. [commit](https://github.com/hispeedimagins/steem/commit/e8443f25408df3477a0f2ad5fa397ad020bf5860) <hr/> ### Fix a divide by zero error A divide by zero error existed while loading followers as sometimes followers can be zero. This is now fixed with a check at the source. #### commits 1. [commit](https://github.com/hispeedimagins/steem/commit/0a044d6d4253eedf65c564b878fe13d8630e1c4e) <hr/> ### Fix 3 bugs 1. fix a bug where the app would crash on null context in notifications 2. fix a bug where the app would crash while parsing bad json result 3. fix a bug where app would crash while liking a post before contants were loaded - this happened when the values required for calculating a vote value were not loaded and the user clicked on liking a post and moved the slider for setting the percentage. #### commits 1. [commit](https://github.com/hispeedimagins/steem/commit/795afe33edb94b87395895bdb0cfaf13ad7fe225) <hr/> Since this app was not open source when I started it, I did not comment much. Only after I have put it on Github have I started adding comments to the whole app and am doing it slowly. Removing dead code slowly with each update and adding comments is a painstaking task. <hr/> #### Want to contact me? Discord server for steemer - https://discord.gg/GkNZCGu My discord username - hispeedimagins#6619 Email - hispeedimagins@gmail.com <hr/> #### GitHub Account\nhttps://github.com/hispeedimagins
👍 kleinheim, jadabug, ezravandi, michael44, selise, jgrimm, isabelll, no0, petergriffin2, tokyoduck, nooo, votes4minnows, steemexpress, ordinaryamerican, reazuliqbal, helpsmendip, slacketerosion, charlimr, fearfultanager, yimitat, gigabodze, wolkowie, real-world, muilyic, utarea, hustiers, echon, atone, tactu, lorist, dopsausurlei, jasminetwo, meganklzd, zoetz2g4baker, ibericovar, triflesleepy, zharov.maksim, butenko.serg, boshben, curlingcesty, germharmony, linksomething, allianzranked, boatswainjick, kingboundless, pauchlaminar, ashleyq3m5e, baisohicjo, orlisraispor, graceb9l73, mariaovs, plasexcecre, kylieeytme, brougagpaduc, progsernaro, taylory, oncidrow, oncow, gasengexr, relomit, laithut, ladysinos, ompendi, ughom, otashik, andeneda, iseserout, noxioussmoke, leonid.bulgakov, zaharia32zvezd, lena118, wivelegeboeing, smellbaryon, lockoperand, blowfisheclogite, colloquialitchy, flagsencourage, splashdrown, amosbastian, nieloagranca, rufans, helo, jaff8, asaj, tobias-g, fego, adamada, bluesniper, ulockblock, espoem, mops2e, ascorphat, holger80, bookkeeping, steemitri, luc.real, steembasicincome, mcfarhat, misia1979, lostmine27, bowess, aboutcoolscience, itastem, davinci.pay, destrudo, alexzicky, davinci.times, davinci.witness, mondodidave73, davinci.polyglot, davinci.art, davinci.vote, nicejob, phage93, dimitrisp, dakeshi, spaghettiscience, stream-master, gentleprince95, photo-it, akireuna, aristotle.team, silviu93, knfitaly, rscalabrini, giornalista, imcesca, drifter1, cryptomaniacsgr, steam.erotic, robertbira, onin91, utopian.trail, techslut, minersean, jakipatryk, walnut1, suesa, tykee, vishalsingh4997, elear, zoneboy, mcyusuf, gentleshaid, aussieninja, netizens, bflanagin, jk6276, dssdsds, jayplayco, stem-espanol, mrsbozz, jk6276.mons, jaxson2011, eternalinferno, erikaflynn, che-shyr, sargoon, didic, rollthedice, tsoldovieri, carloserp-2000, yrmaleza, miguelangel2801, emiliomoron, ulisesfl17, tomastonyperez, elvigia, elpdl, josedelacruz, joseangelvs, viannis, erickyoussif, ubaldonet, reinaseq, lupafilotaxia, fran.frey, lorenzor, iamphysical, felixrodriguez, azulear, ivymalifred, vjap55, eliaschess333, arac, luiscd8a, andrick, yusvelasquez, joelsegovia, jesusfl17, amart29, jrevilla, giulyfarci52, wilmer14molina, alaiza, lapp, steemtpistia, crassipes, agrovision, ajayyy, tdre, rewarding, vanarchist, flores39, rehan12, tensor, dalz, amestyj, alexs1320, scienceangel, yu-stem, eniolw, geadriana, alex-hm, carlos84, sandracarrascal, ennyta, gaming.yer, steem-familia, evangelista.yova, jenniferjulieth, ajfernandez, endopediatria, ingmarvin, alix96, elimao, anaestrada12, yorgermadison, alexjunior, antunez25, haf67, chavas, eglinson, uzcateguiazambra, asmeira, garrillo, douglimarbalzan, pfernandezpetit, mgarrillogonzale, rubenp, jeferc, hirally, emynb, eugenialobo, ballesteroj, jcmontilva, rodriguezr, marbely20, moyam, emilycg, darys, sibaja, balcej, lmanjarres, anaka, benhurg, judisa, juddarivv, mariamo, kimmorales, loraine25, steem-ua, newsrx, lordneroo, jjay, ryuna.siege, utopian-io, tombstone, jga, cryptouno, swapsteem, assokenay, droida, hk422,