← Back to team overview

ubuntu-touch-coreapps team mailing list archive

Re: [ubuntu-touch-coreapps][Facebook] First working code...

 

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

(CC'ing Ken on this, because I'm not sure if he's subscribed to this
list or not)

On 13-03-16 12:52 PM, Hugo Lima wrote:
> - I had to discover the column ids by trial and error (eg: message
> = column_9), is there a better way ? and also the column numbers
> didn't match up with the example friends code.

This is something that Ken is currently working on. The columns are
named nicely within the Python code in the backend, but this
information gets lost somewhere along the way in the Qml bindings. Ken
had made an initial attempt at naming them properly, but there was
some reason it didn't work, and he is still investigating why. I'm
sure he'll be able to explain better what went wrong.

For now, I'll refer you to the model schema definition in the Python
code. Currently that is defined here:

http://bazaar.launchpad.net/~super-friends/friends/trunk/view/head:/friends/utils/model.py#L44

Remember to start counting from 0, so 'message_ids' is 0, 'stream' is
1, etc.

Also, be aware that we have actually made a number of big changes to
this that haven't landed yet, which can be found here:

http://bazaar.launchpad.net/~super-friends/friends/raring/view/head:/friends/utils/model.py#L44

Notable changes include list-flattening, which makes it radically
easier to determine the values of the account_id and the message_id,
also support for geolocation has been added.

So be prepared for that to land this week, hopefully. Once Ken figures
out how to name the columns, you won't have to worry about schema
changes, because even if the columns shuffle around in order, the name
will still be correct.

> - How does friends filter the feed to exclude messages from other
> providers / accounts ?

That's something else that Ken is working on, which I don't believe is
yet available in the code that you are working with, so for right now
you'll just have to put up with Twitter tweets mixed in to your stuff.
But the code that filters the model so that you are only looking at
facebook messages is included with the above big model schema change
that I mentioned, so hopefully that's all going to come together
nicely, real soon now ;-)
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.12 (GNU/Linux)
Comment: Using GnuPG with undefined - http://www.enigmail.net/

iQIcBAEBAgAGBQJRRX1AAAoJEMnVpoCaWglEnnEQAITq7oC8LVbhLEiQeL1A5zDR
sUNBiaPb2uW8lgah6gPco5x15ujKSZqQvknYKwFVxV1psloevqxGHFnnbkqn5Lcg
ExaKrUTpNxFUgHlWpRUmkcHxfvp3CO+2f1GlBRyIT3Il5T63aMjcZgJuGqFSJg6/
UeO/UKLg8Yf6lublebY/Rm0hw09W614Gwaaw53teepuGJp5/+PqKT6Vk5u3D4qvH
Q4xC9lZQMp5K7+roIx88k08p4aK2fWPb8JDgCjvhjFMUUPcS14CTGekVWIALynXW
Qh+JJdfe9mI87cgRcAsRS5qI5mmbBCF3hHsA3PvOpTABfUVeBty7c5pj5e31P3Ne
HiTMDdHJjuMLFZqOu9DbUCObCsqZ+B1lPB7TJhuJkHWP8/ZGAUug1NspaLAN2TSD
OcJ5kIQ7BfvnYw16FVVpTKPj18EGZSxejtnWQGPUIAaNYtr08BeVi5cd1PTgK+YO
AVzSLK5fNQaA1J5P9XOJIxIdBuq2N8XM5f5/Z8xTq/N2iH4EmXYjjd+UqB2FCJJ1
ymMGFwEJDc1hva6frVL7/vnFBsVhQyWhGoqshJO0bPEmzq3UtQB6F9cSt/noJm1R
9P1Lw5Fwt+yiaG1M1YlnivnSffMVO4tRqblBENIUUl6/Q+kz7uhhKfG8OKCjnuB3
wpxcb016fPdZmwUszbc9
=Ewvx
-----END PGP SIGNATURE-----


Follow ups

References