tbillenstein / jTweetsAnywhere

jTweetsAnywhere is a jQuery Twitter Widget that simplifies the integration of Twitter services into your site
http://thomasbillenstein.com/jTweetsAnywhere/
MIT License
51 stars 18 forks source link

no data decorator still shown if tweets found < count #1

Open lazymanc opened 12 years ago

lazymanc commented 12 years ago

If a search returns one or more tweets, but less than "count" option then the noDataDecorator is still displayed.

I've used a test account to tweet the random string "oitjghoirjth" exactly twice so it should only return 2 results.

$("#tweets").jTweetsAnywhere({
  searchParams : ["q=oitjghoirjth"],
  count        : 3,
  showTweetFeed: {
    showProfileImages : true,
    showTimestamp     : { refreshInterval: 15 },
    autorefresh       : { mode: "none" },
    paging            : { mode: "more" }
  }
});

What happens is you'll see 2 tweets rendered and then "no more data" from the default decorator.

Expected behaviour would be to only show the no data decorator if no tweets are found at all.

tbillenstein commented 12 years ago

Well, I think that is a question of how you define the behavior. Currently it's like: if you want to display 3 tweets at a time and only 2 are available, the 2 tweets are displayed and a hint that there is no more data available. To me that makes sense.

On the other hand your argumentation makes sense also to me.

Maybe best solution would be a configuration option to select the desired behavior

lazymanc commented 12 years ago

I think originally I had thought it said "no data" rather than "no more data" which is probably why I expected it not to be shown if there were results - I should read the code more carefully :)

I think what I'm after is a "limit" not a "count", but having two similar params might be confusing, so some kind of switch for the behaviour might be better.