From 127d9d8e0562d315ed025f659503cf64da5c2e13 Mon Sep 17 00:00:00 2001 From: Damyan Ivanov Date: Tue, 8 Jan 2019 20:13:42 +0000 Subject: [PATCH] move ObservableXXXX classes under utils/ --- app/src/main/java/net/ktnx/mobileledger/model/Data.java | 3 +++ .../java/net/ktnx/mobileledger/model/TransactionList.java | 2 ++ .../ui/transaction_list/TransactionListViewModel.java | 4 ++-- .../{model => utils}/ObservableAtomicInteger.java | 4 ++-- .../ktnx/mobileledger/{model => utils}/ObservableValue.java | 2 +- 5 files changed, 10 insertions(+), 5 deletions(-) rename app/src/main/java/net/ktnx/mobileledger/{model => utils}/ObservableAtomicInteger.java (97%) rename app/src/main/java/net/ktnx/mobileledger/{model => utils}/ObservableValue.java (98%) diff --git a/app/src/main/java/net/ktnx/mobileledger/model/Data.java b/app/src/main/java/net/ktnx/mobileledger/model/Data.java index 3ab770b6..f32c3bc6 100644 --- a/app/src/main/java/net/ktnx/mobileledger/model/Data.java +++ b/app/src/main/java/net/ktnx/mobileledger/model/Data.java @@ -17,6 +17,9 @@ package net.ktnx.mobileledger.model; +import net.ktnx.mobileledger.utils.ObservableAtomicInteger; +import net.ktnx.mobileledger.utils.ObservableValue; + import java.util.ArrayList; import java.util.Date; import java.util.List; diff --git a/app/src/main/java/net/ktnx/mobileledger/model/TransactionList.java b/app/src/main/java/net/ktnx/mobileledger/model/TransactionList.java index 966f3cc2..c01c2aac 100644 --- a/app/src/main/java/net/ktnx/mobileledger/model/TransactionList.java +++ b/app/src/main/java/net/ktnx/mobileledger/model/TransactionList.java @@ -17,6 +17,8 @@ package net.ktnx.mobileledger.model; +import net.ktnx.mobileledger.utils.ObservableValue; + import java.util.List; public class TransactionList extends ObservableValue> { diff --git a/app/src/main/java/net/ktnx/mobileledger/ui/transaction_list/TransactionListViewModel.java b/app/src/main/java/net/ktnx/mobileledger/ui/transaction_list/TransactionListViewModel.java index 3693a149..299fcbb8 100644 --- a/app/src/main/java/net/ktnx/mobileledger/ui/transaction_list/TransactionListViewModel.java +++ b/app/src/main/java/net/ktnx/mobileledger/ui/transaction_list/TransactionListViewModel.java @@ -1,5 +1,5 @@ /* - * Copyright © 2018 Damyan Ivanov. + * Copyright © 2019 Damyan Ivanov. * This file is part of Mobile-Ledger. * Mobile-Ledger is free software: you can distribute it and/or modify it * under the term of the GNU General Public License as published by @@ -27,7 +27,7 @@ import net.ktnx.mobileledger.R; import net.ktnx.mobileledger.async.UpdateTransactionsTask; import net.ktnx.mobileledger.model.Data; import net.ktnx.mobileledger.model.LedgerTransaction; -import net.ktnx.mobileledger.model.ObservableValue; +import net.ktnx.mobileledger.utils.ObservableValue; import java.util.List; diff --git a/app/src/main/java/net/ktnx/mobileledger/model/ObservableAtomicInteger.java b/app/src/main/java/net/ktnx/mobileledger/utils/ObservableAtomicInteger.java similarity index 97% rename from app/src/main/java/net/ktnx/mobileledger/model/ObservableAtomicInteger.java rename to app/src/main/java/net/ktnx/mobileledger/utils/ObservableAtomicInteger.java index 218229fa..9e1ba922 100644 --- a/app/src/main/java/net/ktnx/mobileledger/model/ObservableAtomicInteger.java +++ b/app/src/main/java/net/ktnx/mobileledger/utils/ObservableAtomicInteger.java @@ -15,7 +15,7 @@ * along with Mobile-Ledger. If not, see . */ -package net.ktnx.mobileledger.model; +package net.ktnx.mobileledger.utils; import android.os.Build; import android.support.annotation.RequiresApi; @@ -31,7 +31,7 @@ public class ObservableAtomicInteger extends Observable { super(); holder = new AtomicInteger(); } - ObservableAtomicInteger(int initialValue) { + public ObservableAtomicInteger(int initialValue) { this(); holder.set(initialValue); } diff --git a/app/src/main/java/net/ktnx/mobileledger/model/ObservableValue.java b/app/src/main/java/net/ktnx/mobileledger/utils/ObservableValue.java similarity index 98% rename from app/src/main/java/net/ktnx/mobileledger/model/ObservableValue.java rename to app/src/main/java/net/ktnx/mobileledger/utils/ObservableValue.java index 46328157..01fa0926 100644 --- a/app/src/main/java/net/ktnx/mobileledger/model/ObservableValue.java +++ b/app/src/main/java/net/ktnx/mobileledger/utils/ObservableValue.java @@ -15,7 +15,7 @@ * along with Mobile-Ledger. If not, see . */ -package net.ktnx.mobileledger.model; +package net.ktnx.mobileledger.utils; import java.util.Observable; import java.util.Observer; -- 2.39.5