From d2a7b26e98569624347d717d7fdfe6c3074658a9 Mon Sep 17 00:00:00 2001 From: Kelly Rauchenberger Date: Thu, 18 Sep 2008 02:00:17 +0000 Subject: Client: Fixed the unsubscription bug Fixes #56 --- .../src/com/fourisland/instadisc/Item/SubscriptionFile.java | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) 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 { } public static void deleteSubscription(Subscription s, boolean deleteFromData) { + int i = 0; + com.fourisland.instadisc.Database.Item it[] = Wrapper.getAllItem(); + for (i = 0; i < it.length; i++) + { + if (it[i].getSubscription().equals(s.getURL())) + { + Wrapper.deleteItem(it[i].getID()); + } + } + if (deleteFromData) { Wrapper.deleteSubscription(s.getURL()); @@ -57,7 +67,6 @@ public class SubscriptionFile { xmlrpc.addParam(s.getURL()); xmlrpc.execute(); - int i = 0; Filter f[] = Wrapper.getAllFilter(); for (i = 0; i < f.length; i++) { -- cgit 1.4.1