Preserve changes to the My eBay search on restart. We were overwriting it, because searches were loaded later than the auction server, and the auction server was deciding that there wasn't a 'My eBay' search created yet, and then when the searches loaded later, the one from the save file was being ignored, since it already existed.
[#188 state:resolved]
- M jbidwatcher/trunk/src/com/jbidwatcher/app/JBidWatch.java view
- M jbidwatcher/trunk/src/com/jbidwatcher/search/SearchManager.java view
| 568 | 573 | |
|---|---|---|
| 402 | 402 | ErrorManagement.handleException("Upgrading error", e); |
| 403 | 403 | } |
| 404 | 404 | |
| 405 | // We need to load searches before adding the eBay server, so | |
| 406 | // that it knows that a My eBay search already exists and doesn't | |
| 407 | // try to recreate it. | |
| 408 | SearchManager.getInstance().loadSearches(); | |
| 409 | ||
| 405 | 410 | if(!ebayLoaded) AuctionServerManager.getInstance().addServer(new ebayServer()); |
| 406 | 411 | AuctionEntry.setResolver(AuctionServerManager.getInstance()); |
| 407 | 412 | loadProxySettings(); |
| --- | --- | |
| 539 | 544 | AuctionsManager.getInstance().loadAuctions(); |
| 540 | 545 | } |
| 541 | 546 | |
| 542 | // This needs to be after the auction manager, so that all the | |
| 543 | // auction servers that are loaded by loading auctions will be | |
| 544 | // available to add searches if they need to. | |
| 545 | inSplash.message("Loading Searches"); | |
| 546 | SearchManager.getInstance().loadSearches(); | |
| 547 | ||
| 548 | 547 | AuctionServerManager.getInstance().getDefaultServerTime(); |
| 549 | 548 | |
| 550 | 549 | JConfig.registerListener(this); |
| 415 | 573 | |
|---|---|---|
| 146 | 146 | xmlFile.parseFromReader(isr); |
| 147 | 147 | |
| 148 | 148 | if(!xmlFile.getTagName().equals("searches")) { |
| 149 | throw new XMLParseException(xmlFile.getTagName(), "AuctionsManager only recognizes <searches> tag!"); | |
| 149 | throw new XMLParseException(xmlFile.getTagName(), "SearchManager only recognizes <searches> tag!"); | |
| 150 | 150 | } else { |
| 151 | 151 | fromXML(xmlFile); |
| 152 | 152 | } |
