diff options
author | Kelly Rauchenberger <fefferburbia@gmail.com> | 2008-09-18 02:00:17 +0000 |
---|---|---|
committer | Kelly Rauchenberger <fefferburbia@gmail.com> | 2008-09-18 02:00:17 +0000 |
commit | d2a7b26e98569624347d717d7fdfe6c3074658a9 (patch) | |
tree | 31a410315dc0cd35ae7f43238adc4f9e832c13ea | |
parent | 372ee87266dd77f95a54225c563a386accdb70b6 (diff) | |
download | instadisc-d2a7b26e98569624347d717d7fdfe6c3074658a9.tar.gz instadisc-d2a7b26e98569624347d717d7fdfe6c3074658a9.tar.bz2 instadisc-d2a7b26e98569624347d717d7fdfe6c3074658a9.zip |
Client: Fixed the unsubscription bug
Fixes #56
-rw-r--r-- | client/trunk/src/com/fourisland/instadisc/Item/SubscriptionFile.java | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/client/trunk/src/com/fourisland/instadisc/Item/SubscriptionFile.java b/client/trunk/src/com/fourisland/instadisc/Item/SubscriptionFile.java index 4d8976d..93c9843 100644 --- a/client/trunk/src/com/fourisland/instadisc/Item/SubscriptionFile.java +++ b/client/trunk/src/com/fourisland/instadisc/Item/SubscriptionFile.java | |||
@@ -48,6 +48,16 @@ public class SubscriptionFile { | |||
48 | } | 48 | } |
49 | 49 | ||
50 | public static void deleteSubscription(Subscription s, boolean deleteFromData) { | 50 | public static void deleteSubscription(Subscription s, boolean deleteFromData) { |
51 | int i = 0; | ||
52 | com.fourisland.instadisc.Database.Item it[] = Wrapper.getAllItem(); | ||
53 | for (i = 0; i < it.length; i++) | ||
54 | { | ||
55 | if (it[i].getSubscription().equals(s.getURL())) | ||
56 | { | ||
57 | Wrapper.deleteItem(it[i].getID()); | ||
58 | } | ||
59 | } | ||
60 | |||
51 | if (deleteFromData) | 61 | if (deleteFromData) |
52 | { | 62 | { |
53 | Wrapper.deleteSubscription(s.getURL()); | 63 | Wrapper.deleteSubscription(s.getURL()); |
@@ -57,7 +67,6 @@ public class SubscriptionFile { | |||
57 | xmlrpc.addParam(s.getURL()); | 67 | xmlrpc.addParam(s.getURL()); |
58 | xmlrpc.execute(); | 68 | xmlrpc.execute(); |
59 | 69 | ||
60 | int i = 0; | ||
61 | Filter f[] = Wrapper.getAllFilter(); | 70 | Filter f[] = Wrapper.getAllFilter(); |
62 | for (i = 0; i < f.length; i++) | 71 | for (i = 0; i < f.length; i++) |
63 | { | 72 | { |