mirror of https://github.com/tasks/tasks
Fetch tags and lists with counts
parent
c7b7e13768
commit
ead60643be
@ -0,0 +1,55 @@
|
||||
package org.tasks.filters;
|
||||
|
||||
import androidx.room.Embedded;
|
||||
import org.tasks.data.CaldavAccount;
|
||||
import org.tasks.data.CaldavCalendar;
|
||||
|
||||
public class CaldavFilters {
|
||||
@Embedded public CaldavCalendar caldavCalendar;
|
||||
@Embedded public CaldavAccount caldavAccount;
|
||||
public int count;
|
||||
|
||||
@Override
|
||||
public boolean equals(Object o) {
|
||||
if (this == o) {
|
||||
return true;
|
||||
}
|
||||
if (o == null || getClass() != o.getClass()) {
|
||||
return false;
|
||||
}
|
||||
|
||||
CaldavFilters that = (CaldavFilters) o;
|
||||
|
||||
if (count != that.count) {
|
||||
return false;
|
||||
}
|
||||
if (caldavCalendar != null
|
||||
? !caldavCalendar.equals(that.caldavCalendar)
|
||||
: that.caldavCalendar != null) {
|
||||
return false;
|
||||
}
|
||||
return caldavAccount != null
|
||||
? caldavAccount.equals(that.caldavAccount)
|
||||
: that.caldavAccount == null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
int result = caldavCalendar != null ? caldavCalendar.hashCode() : 0;
|
||||
result = 31 * result + (caldavAccount != null ? caldavAccount.hashCode() : 0);
|
||||
result = 31 * result + count;
|
||||
return result;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "CaldavFilters{"
|
||||
+ "caldavCalendar="
|
||||
+ caldavCalendar
|
||||
+ ", caldavAccount="
|
||||
+ caldavAccount
|
||||
+ ", count="
|
||||
+ count
|
||||
+ '}';
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,55 @@
|
||||
package org.tasks.filters;
|
||||
|
||||
import androidx.room.Embedded;
|
||||
import org.tasks.data.GoogleTaskAccount;
|
||||
import org.tasks.data.GoogleTaskList;
|
||||
|
||||
public class GoogleTaskFilters {
|
||||
@Embedded public GoogleTaskList googleTaskList;
|
||||
@Embedded public GoogleTaskAccount googleTaskAccount;
|
||||
public int count;
|
||||
|
||||
@Override
|
||||
public boolean equals(Object o) {
|
||||
if (this == o) {
|
||||
return true;
|
||||
}
|
||||
if (o == null || getClass() != o.getClass()) {
|
||||
return false;
|
||||
}
|
||||
|
||||
GoogleTaskFilters that = (GoogleTaskFilters) o;
|
||||
|
||||
if (count != that.count) {
|
||||
return false;
|
||||
}
|
||||
if (googleTaskList != null
|
||||
? !googleTaskList.equals(that.googleTaskList)
|
||||
: that.googleTaskList != null) {
|
||||
return false;
|
||||
}
|
||||
return googleTaskAccount != null
|
||||
? googleTaskAccount.equals(that.googleTaskAccount)
|
||||
: that.googleTaskAccount == null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
int result = googleTaskList != null ? googleTaskList.hashCode() : 0;
|
||||
result = 31 * result + (googleTaskAccount != null ? googleTaskAccount.hashCode() : 0);
|
||||
result = 31 * result + count;
|
||||
return result;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "GoogleTaskFilters{"
|
||||
+ "googleTaskList="
|
||||
+ googleTaskList
|
||||
+ ", googleTaskAccount="
|
||||
+ googleTaskAccount
|
||||
+ ", count="
|
||||
+ count
|
||||
+ '}';
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,43 @@
|
||||
package org.tasks.filters;
|
||||
|
||||
import androidx.room.Embedded;
|
||||
import com.todoroo.astrid.api.TagFilter;
|
||||
import org.tasks.data.TagData;
|
||||
|
||||
public class TagFilters {
|
||||
@Embedded public TagData tagData;
|
||||
public int count;
|
||||
|
||||
public TagFilter toTagFilter() {
|
||||
return new TagFilter(tagData);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object o) {
|
||||
if (this == o) {
|
||||
return true;
|
||||
}
|
||||
if (!(o instanceof TagFilters)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
TagFilters that = (TagFilters) o;
|
||||
|
||||
if (count != that.count) {
|
||||
return false;
|
||||
}
|
||||
return tagData != null ? tagData.equals(that.tagData) : that.tagData == null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
int result = tagData != null ? tagData.hashCode() : 0;
|
||||
result = 31 * result + count;
|
||||
return result;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "TagFilters{" + "tagData=" + tagData + ", count=" + count + '}';
|
||||
}
|
||||
}
|
||||
Loading…
Reference in New Issue