Bug 292044

Summary: All read feeds shown in timeline appear as unread when launching Choqok
Product: [Unmaintained] choqok Reporter: Oriol Mirosa <oriol>
Component: generalAssignee: Mehrdad Momeny <mehrdad.momeny>
Status: RESOLVED UNMAINTAINED    
Severity: normal CC: lgoster, scarpino
Priority: NOR    
Version First Reported In: 1.2   
Target Milestone: ---   
Platform: Unlisted Binaries   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:
Attachments: Snapshot of my desktop after re-starting Choqok

Description Oriol Mirosa 2012-01-20 15:39:43 UTC
Version:           1.2 (using KDE 4.7.4) 
OS:                Linux

I know that this is a problem that has happened in previous versions that it was supposed to be taken care of, but it still happens to me every time in Kubuntu (11.10).

Whenever Choqok is launched, all the messages shown in the timelines appear as unread, even if they had been marked as read before exiting the application. It happens with all the messages shown in the timelines irrespective of the number, i.e: if I set up Choqok to show 20 messages, the 20 in the home, reply, inbox, etc. timelines appear as unread. If I set it up to show 50 messages, the same happens for the 50.

I have purged all the choqok folder and config files in my system and reinstalled, and the problem remains. When I check myaccount_Home_backuprc the feeds are listed as read (isRead=true), yet they still appear in Choqok as unread.

Could this be a problem that only happens in Kubuntu? Is there anything else I can do to try to fix this?

Reproducible: Always

Steps to Reproduce:
Mark any (or all) feeds as read. Exit Choqok. Launch Choqok again.

Actual Results:  
All the previously marked as read feeds appear as unread.

Expected Results:  
Show the feeds marked 'read' as read when re-launching.
Comment 1 Mehrdad Momeny 2012-01-28 04:23:12 UTC
Hmm, Can u give me a snapshot right after launching Choqok?!
Comment 2 Oriol Mirosa 2012-01-28 05:19:56 UTC
Created attachment 68263 [details]
Snapshot of my desktop after re-starting Choqok
Comment 3 Lluís Garrido 2015-03-27 10:17:57 UTC
Hi everyone,

I do have the same problem with choqok version 1.4 and version 1.5. However, I think I have more or less tracked down the source of the problem but I do not know how to solve it since I do not have knowledge in Qt libraries.

The abstract of the problem can be written as: "The source of the problem seems to be the way the dates are managed when writing or reading data from disc."

I explain you in detail the experiments I have done:

1. I downloaded the recently released 1.5 version of choqok code.
2. I compiled the code using kde 4.14
3. I installed choqok and executed it.
4. Tweets were downloaded correctly. 
5. I marked all the tweets as read and exited the application using the menu.
6. I checked that the ~/.kde4/share/apps/choqok/lgoster_Home_backupr was correctly up to date. Indeed, within the file all tags isRead where set to true.
7. I then run again the application but all the tweets were set to unread.

I then went for the source code. In particular,  I edited file ./helperlibs/twitterapihelper/twitterapimicroblog.cpp. I assume that within member function TwitterApiMicroBlog::loadTimeline the timeline is read.

After doing some experiments I saw that the problem is within these lines of code:

/// to don't load old archives
    if( tmpList.isEmpty() || !(QDateTime::fromString(tmpList.first()).isValid()) )
        return list;
///--------------

The problem is within the second codition which **always fails** even if the timeline was written by the code 1.5 itself. Indeed, I checked this by changing the previous code to this:

std::cout << "Before" << std::endl;
/// to don't load old archives
    if (!(QDateTime::fromString(tmpList.first()).isValid()))
       return list;
///--------------
    std::cout << "After" << std::endl;

When running the code, the string "Before" is always printed to screen but the string "After" is never printed to screen.

Thus, I think that there should be some problem with the date formatting when writting or reading the time line. This may be related to some local setting but I do not know how to solve it.

Best,

Luis
Comment 4 Lluís Garrido 2015-04-06 16:12:41 UTC
Dear all,

I've been able to solve the problem. At least in my particular case it is enough. 

The solution: open a web browser, go to twitter, and change the configuration so as to set the language to *english*. 

Now close the web browser, run chowok, and when you mark tweets as read they will remain as read if you close choqok and open it immediately.

It would then be fine to improve choqok to support other language configurations.

Best,

Luis
Comment 5 Mehrdad Momeny 2015-04-07 01:25:59 UTC
(In reply to Lluís Garrido from comment #4)
> Dear all,
> 
> I've been able to solve the problem. At least in my particular case it is
> enough. 
> 
> The solution: open a web browser, go to twitter, and change the
> configuration so as to set the language to *english*. 
> 
> Now close the web browser, run chowok, and when you mark tweets as read they
> will remain as read if you close choqok and open it immediately.
> 
> It would then be fine to improve choqok to support other language
> configurations.
> 
> Best,
> 
> Luis

Thanks a lot for your investigations Luis, so based on that, I can guess Twitter is giving the datetime in local setting, which I think isn't correct. we should further investigate it and probably report it to Twitter. or find if Qt has a way to parse the localized datetime data.
Comment 6 Lluís Garrido 2015-05-12 16:25:56 UTC
Hi Mehrdad,

I do have again the same problem: each time I start the application all tweets appear as unread even if I start the application a few seconds after closing it. I've tried to change again the settings in Twitter's web page but this does not seem the source of the problem.

Indeed, I remember that the problem began to appear after a update of some packages in my distribution (OpenSuse). Thus, is there the possibility that the problem is due to some local setting in my computer? I would be grateful if you could attach here one entry of the "XXXX_Home_backuprc" file so that I can make some tests.

Thanks a lot!

Luis
Comment 7 Lluís Garrido 2015-05-22 18:07:42 UTC
Hi,

I've come again with another solution to solve the problem I have. The solution I have found is based on changing *locally* the application language to English. I have found that this can be done easily with

$ export LANG=""
$ ./choqok

A script can be easily used so that choqok is launched each time using English. Indeed, this affects the way the log is saved to disk when quitting the application. When using this setting, the log file (XXX_Home_backuprc) has this structure

[Fri May 22 16:17:08 2015]
.... < text removed> ...

[Fri May 22 16:20:03 2015]
.... < text removed > ...

The structure of this file seems to be independent with the Twitter's language setting. That is, even if the Twitter's language is changed the date format remains in English.

By using this setting, thus, everything works fine.

On the other hand, I usually use the "ca_ES.UTF-8" setting as language in my computer. In this case, the choqok application does not read the log file (since it fails at reading the timeline as described in previous posts). In this case, the log file structure is as follows

[dv. de maig 22 16:17:08 2015]
.... <text removed> ....

[dv. de maig 22 16:20:03 2015
... <text removed> ....

Any ideas of what may be going on? 

Thanks,

Luis
Comment 8 Justin Zobel 2021-03-09 01:26:42 UTC
Thank you for the bug report.

As this report hasn't seen any changes in 5 years or more, we ask if you can please confirm that the issue still persists.

If this bug is no longer persisting or relevant please change the status to resolved.
Comment 9 Christoph Cullmann 2025-06-09 20:08:16 UTC
Choqok is unfortunately no longer maintained.

If a new maintainer wants to step up and take care, the project is archived here:

https://invent.kde.org/network/choqok

You can just clone it in your private namespace on invent.kde.org and if you have started to work on it and fixed/implemented something get it reviewed and the project unarchived.

Sorry for the inconveniences.