Skip to content

Commit

Permalink
Disabled the donation menu item for now as there is no public key for…
Browse files Browse the repository at this point in the history
… it yet
  • Loading branch information
eyedol committed Aug 9, 2013
1 parent cf3c75b commit ca144b7
Showing 1 changed file with 62 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@
import android.content.Intent;
import android.content.res.Configuration;
import android.os.Bundle;
import android.os.Handler;
import android.support.v4.app.ActionBarDrawerToggle;
import android.support.v4.view.GravityCompat;
import android.support.v4.widget.DrawerLayout;
Expand Down Expand Up @@ -261,7 +262,66 @@ public void openActivityOrFragment(Intent intent) {

protected void createNavDrawer() {
navDrawerAdapter = new NavDrawerAdapter(this);
new NavDrawerItemTask(this).execute((String) null);
//new NavDrawerItemTask(this).execute((String) null);
final PendingMessagesNavDrawerItem pendingMessagesNavDrawerItem;

final SentMessagesNavDrawerItem sentMessagesNavDrawerItem;

final SyncUrlNavDrawerItem syncUrlNavDrawerItem;

//final DonationNavDrawerItem donationNavDrawerItem;

final BlacklistNavDrawerItem filterNavDrawerItem;

final WhitelistNavDrawerItem whitelistNavDrawerItem;

final List<BaseNavDrawerItem> navDrawerItem;

pendingMessagesNavDrawerItem
= new PendingMessagesNavDrawerItem(
getString(R.string.pending_messages),
R.drawable.pending, BaseActivity.this);

sentMessagesNavDrawerItem = new SentMessagesNavDrawerItem(
getString(R.string.sent_messages),
R.drawable.sent, BaseActivity.this);

syncUrlNavDrawerItem = new SyncUrlNavDrawerItem(getString(
R.string.sync_url),
R.drawable.sync_url, BaseActivity.this);

/*donationNavDrawerItem = new DonationNavDrawerItem(getString(R.string.donate),
R.drawable.donate, BaseActivity.this);*/

filterNavDrawerItem = new BlacklistNavDrawerItem(getString(R.string.blacklist),
R.drawable.blacklist, BaseActivity.this);

whitelistNavDrawerItem = new WhitelistNavDrawerItem(getString(R.string.whitelist),
R.drawable.whitelist, BaseActivity.this);

navDrawerItem = new ArrayList<BaseNavDrawerItem>();

new Handler().post(new Runnable(){

@Override
public void run() {
sentMessagesNavDrawerItem.setCounter();
pendingMessagesNavDrawerItem.setCounter();
syncUrlNavDrawerItem.setCounter();
//donationNavDrawerItem.setCounter();
filterNavDrawerItem.setCounter();
whitelistNavDrawerItem.setCounter();
navDrawerItem.add(pendingMessagesNavDrawerItem);
navDrawerItem.add(sentMessagesNavDrawerItem);
navDrawerItem.add(syncUrlNavDrawerItem);
//navDrawerItem.add(donationNavDrawerItem);
navDrawerItem.add(whitelistNavDrawerItem);
navDrawerItem.add(filterNavDrawerItem);
navDrawerAdapter.setItems(navDrawerItem);
listView.setAdapter(navDrawerAdapter);
selectItem(0);
}
});
initNavDrawer();
}

Expand Down Expand Up @@ -421,6 +481,7 @@ public void onItemClick(AdapterView<?> parent, android.view.View view, int posit

}

//TODO:: remove this code at some point
private class NavDrawerItemTask extends ProgressTask {

PendingMessagesNavDrawerItem pendingMessagesNavDrawerItem;
Expand Down

0 comments on commit ca144b7

Please sign in to comment.