Skip to content

Maybe fix bug for Common.shouldDelay#6

Merged
tinyeeliu merged 1 commit intotinyeeliu:masterfrom
neocoin:master
Oct 29, 2011
Merged

Maybe fix bug for Common.shouldDelay#6
tinyeeliu merged 1 commit intotinyeeliu:masterfrom
neocoin:master

Conversation

@neocoin
Copy link
Copy Markdown
Contributor

@neocoin neocoin commented Oct 28, 2011

This commit is just removing BaseAdapter check code in Common#shouldDelay

If ListView#addFooterView or ListView#addHeaderView are used, ListView#setAdapter use wrapper adapter(aka HeaderViewListAdapter) that implemented just ListAdapter.

Because of this wrapper adapter, BaseAdapter type checking code block Common#shouldDelay's right operation.

I think this code to need double check with you. I don't exactly understand why you check BaseAdapter at that position. I just edit code and check for my application's right operation.

Thank you for this feature. My original delayed image loading part changed very simple code.

…addHeaderView are used, ListView#setAdapter use wrapper adapter(aka HeaderViewListAdapter) that implemented just ListAdapter). Because of this wrapper adapter, BaseAdapter type checking code block Common#shouldDelay right operation.
@tinyeeliu
Copy link
Copy Markdown
Owner

That's indeed a bug. I handled this in the dataChanged method but not there.
Thanks for reporting it. I really appreciate your contribution.

Peter

On Sat, Oct 29, 2011 at 7:51 AM, Sangmin Ryu <
reply@reply.github.com>wrote:

This commit just removing BaseAdapter check code in Common#shouldDelay

If ListView#addFooterView or ListView#addHeaderView are used,
ListView#setAdapter use wrapper adapter(aka HeaderViewListAdapter) that
implemented just ListAdapter.

Because of this wrapper adapter, BaseAdapter type checking code block
Common#shouldDelay's right operation.

I think this code to need double check with you. I don't exactly understand
why you check BaseAdapter at that position. I just edit code and check for
my application's right operation.

Thank you for this effort. My original delayed image loading code changed
very simple shape.

You can merge this Pull Request by running:

git pull https://github.com/neocoin/androidquery master

Or you can view, comment on it, or merge it online at:

#6

-- Commit Summary --

  • remove BaseAdapter check code. If ListView#addFooterView or
    ListView#addHeaderView are used, ListView#setAdapter use wrapper adapter(aka
    HeaderViewListAdapter) that implemented just ListAdapter). Because of this
    wrapper adapter, BaseAdapter type checking code block Common#shouldDelay
    right operation.

-- File Changes --

M src/com/androidquery/util/Common.java (8)

-- Patch Links --

https://github.com/androidquery/androidquery/pull/6.patch
https://github.com/androidquery/androidquery/pull/6.diff

Reply to this email directly or view it on GitHub:
#6

tinyeeliu added a commit that referenced this pull request Oct 29, 2011
Maybe fix bug for Common.shouldDelay
@tinyeeliu tinyeeliu merged commit 94bfaa3 into tinyeeliu:master Oct 29, 2011
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants