Skip to content

Commit

Permalink
bug fix: autorefresh does not work when returning from background.
Browse files Browse the repository at this point in the history
  • Loading branch information
udibr committed May 1, 2011
1 parent ddf2e3d commit dcc4edc
Show file tree
Hide file tree
Showing 3 changed files with 37 additions and 16 deletions.
23 changes: 18 additions & 5 deletions BitCoin/RPCDataSource.m
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,13 @@ - (id)initWithItemRepeat:(BOOL)repeat command:(NSString*)command params:(NSArray

[[NSNotificationCenter defaultCenter]
addObserver: self
selector: @selector(didEnterBackgroundNotification:)
name: UIApplicationDidEnterBackgroundNotification
selector: @selector(willResignActiveNotification:)
name: UIApplicationWillResignActiveNotification
object: nil];
[[NSNotificationCenter defaultCenter]
addObserver: self
selector: @selector(didBecomeActiveNotification:)
name: UIApplicationDidBecomeActiveNotification
object: nil];
}

Expand All @@ -42,9 +47,13 @@ - (void)dealloc {

[[NSNotificationCenter defaultCenter]
removeObserver: self
name: UIApplicationDidEnterBackgroundNotification
name: UIApplicationWillResignActiveNotification
object: nil];

[[NSNotificationCenter defaultCenter]
removeObserver: self
name: UIApplicationDidBecomeActiveNotification
object: nil];

self.reloadTimer = nil;

self.items = nil;
Expand All @@ -69,9 +78,13 @@ - (void)startReload:(NSTimeInterval)animationInterval
self.reloadTimer = [NSTimer scheduledTimerWithTimeInterval:animationInterval target:self selector:@selector(reloadModel) userInfo:nil repeats:NO];
}

- (void)didEnterBackgroundNotification:(void*)object {
- (void)willResignActiveNotification:(void*)object {
[self cancel];
}
-(void)didBecomeActiveNotification:(NSNotification*)notification
{
[self reloadModel];
}

///////////////////////////////////////////////////////////////////////////////////////////////////
//- (id<TTModel>)model { // already implemented in TTTableViewDataSource
Expand Down
1 change: 1 addition & 0 deletions BitCoin/whatsnew.html
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ <h3>Known issues</h3>
</ul>
<h3>1.0.6</h3>
<ul>
<li>bug fix: autorefresh does not work when returning from background</li>
<li>Console: fix getaddressesbyaccount example</li>
</ul>
<h3>1.0.5</h3>
Expand Down
29 changes: 18 additions & 11 deletions TODO
Original file line number Diff line number Diff line change
@@ -1,15 +1,22 @@
features
* encrypt wallet
* give current block number (http://blockexplorer.com/q/getblockcount)
* find solution to long (8hr) of downloading all blocks on first time
* find solution for slow start time of node (1-2 min)
* find solution for node not responding once in a while after getting to steady state
* show balance as a badge on launch pad
* QR
* SMS
* Node:
** find solution to long (8hr) of downloading all blocks on first time
** find solution for slow start time of node (1-2 min)
** find solution for node not responding once in a while after getting to steady state
* balance:
** give current block number (http://blockexplorer.com/q/getblockcount) - do we really need this? we have the time...
** show balance as a badge on launch pad - do we want this? balance maybe out of date...
** show balance and confirmation for each address
* generante new address button
* use In App Purchase to sell bitcoins
* upload (encrypted) wallet to a single backup-site
* list all address
** how to get them? getaddressesbyaccount does not return all addresses, how to get all accounts? are there addresses without any account?ß
** clicking on an address allow you to copy or email/SMS/QR it.
* wallet:
** encrypt wallet
** upload (encrypted) wallet to a single backup-site
* App:
** use In App Purchase to sell bitcoins

bugs
* autorefresh does not work when returning from background.
* Assertion failed: (_Unwind_SjLj_Resume() can't return), function _Unwind_SjLj_Resume, file /SourceCache/libunwind/libunwind-24.1/src/Unwind-sjlj.c, line 326.
* Only glitch I had: when I launched the app for the 1st time, I noticed that on the Balance tab the block count seemed to get stuck at 1500. I let it sit for a minute or two and nothing happened. Once I quit the app and re-ran it, I saw the network activity icon appear in the top bar and block count started incrementing as blocks were processed. Then it stopped again at 3625. I rolled up to force an "update" and network activity resumed but not the block count.

0 comments on commit dcc4edc

Please sign in to comment.