All sorts and things.

in #utopian-io8 years ago (edited)

New Feature - Sort

Sorting is now available for all lists created in CafeSync.

Screenshot_20180421-221352.png

Sorts include:

  • By Date (Newest first)
  • By Name (Alphabetical)
  • By Company (Alphabetical)
  • By Category
Implementation:

CafeSync uses sqlite for the majority of its data storage and retrieval and sorting is done using "Order by" and then specifying the sort order either Ascending or Descending. The changes begin with adding a new variable to the function call.( sortOpt -main.js- ) then I specified a variable called "Sort" and used a switch statement to fill "Sort" with the proper information ( sortOpt Switch -main.js- ) and finally I added the variable "Sort" to the end of the SqL command ( Sort -main.js- )
This code was used both in the saved cards function as well as the temporary cards function as it was copied verbatim from one to the other I will leave it out for brevity.

In the main.qml file I connected the sort button with the function in main.js ( sicon -main.qml ) after creating a variable in the main.qml file called sort.

New Feature - Micro Blogging

Added as a way to engage other users quickly, and at the request of one of the users I created a micro blogging service similar to twitter. This is a rather simple implementation currently, but you can now see the latest "Status updates" from other users directly on their card. And set your status via your main area under your card.

Screenshot_20180410-144304.png

Implementation:

CafeSync uses OpenSeed to for chat and micro-blogging as well as numerous other things. OpenSeed is currently under development by Benjamin Flanagin and when ready will be released as a free and open source Networking API.
For the sake of brevity the entire [microblogger.js] (https://github.com/OpenSeedINC/CafeSync/blob/master/microblogger.js) file is used for these services.

In microblogger.js these functions are used for the feature.

  • latest_log_remote: is used to pull the latest post from a selected user.
  • latest_log : is used to pull the local users latest post.
  • send_log: sends the status to the OpenSeed server
  • save_log: saves the log data to the local device.

these functions are referenced in the Card.qml file as well as Home.qml. Both simply call the functions listed above and display the returned value. Due to inconsistent behavior the function fills a variable cardStatus for latest_log_remote instead of returning the value directly.

More micro-blogging features will be available in the coming updates and will be talked about more heavily then.

Find out more

Curious about CafeSync and what it does? Check out my other posts here on Utopian and/or SteemIt

Downloads

Android Version



Posted on Utopian.io - Rewarding Open Source Contributors

Sort:  

Thanks for the contribution. It has been approved.

I tried getting it to run locally, but after installing everything I still couldn't get it to work (my fault). Unfortunately I've only ever used Android Studio once, so I had no idea what I was doing - any help regarding this would be appreciated, haha.

Anyway, the project looks cool and I am happy that you explained the implementation, as that's always really interesting to me. Good luck with your future contributions!


Need help? Write a ticket on https://support.utopian.io.
Chat with us on Discord.

[utopian-moderator]

Hey @amosbastian, I just gave you a tip for your hard work on moderation. Upvote this comment to support the utopian moderators and increase your future rewards!

I'll try to make a tutorial on it later. Android Studio is a lot like a house of cards, if one thing isn't right the whole thing breaks. However I'm going to be creating a Desktop application based on the same code, in the near future so hopefully that will be the easier contribution vector.

Hey @bflanagin! Thank you for the great work you've done!

We're already looking forward to your next contribution!

Fully Decentralized Rewards

We hope you will take the time to share your expertise and knowledge by rating contributions made by others on Utopian.io to help us reward the best contributions together.

Utopian Witness!

Vote for Utopian Witness! We are made of developers, system administrators, entrepreneurs, artists, content creators, thinkers. We embrace every nationality, mindset and belief.

Want to chat? Join us on Discord https://discord.me/utopian-io

Coin Marketplace

STEEM 0.04
TRX 0.32
JST 0.088
BTC 61668.19
ETH 1699.52
USDT 1.00
SBD 0.38