Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ android {
dependencies {
/// dependencies for app building
implementation 'com.android.support:multidex:1.0.2'
implementation 'com.github.nextcloud:android-library:1.0.33'
implementation 'com.github.nextcloud:android-library:activity-previews-SNAPSHOT'
versionDevImplementation 'com.github.nextcloud:android-library:1.0.33'
implementation "com.android.support:support-v4:${supportLibraryVersion}"
implementation "com.android.support:design:${supportLibraryVersion}"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,8 @@ public void setActivityItems(List<Object> activityItems, OwnCloudClient client)
this.mClient = client;
mValues.clear();
String sTime = "";
for (Object o : activityItems) {
List<Activity> activityList = (List<Activity>) activityItems.get(0);
for (Object o : activityList) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

erm, wouldn't make sense to then use Activity right away since you casted to a List of Activities already? ;)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It was a really quick fix to get it working.
But currently I am unsure what the nextcloud/android-library#73 pr is doing at all... ;-)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should also find the root cause of #1848 since that reported bug would still happen here and cause a crash of the app...

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Or not, I am not sure at this time of the day... too late at night...

Activity activity = (Activity) o;
String time;
if (activity.getDatetime() != null) {
Expand Down Expand Up @@ -370,11 +371,11 @@ private class ActivityViewHolder extends RecyclerView.ViewHolder {

private ActivityViewHolder(View itemView) {
super(itemView);
activityIcon = (ImageView) itemView.findViewById(R.id.activity_icon);
subject = (TextView) itemView.findViewById(R.id.activity_subject);
message = (TextView) itemView.findViewById(R.id.activity_message);
dateTime = (TextView) itemView.findViewById(R.id.activity_datetime);
list = (GridLayout) itemView.findViewById(R.id.list);
activityIcon = itemView.findViewById(R.id.activity_icon);
subject = itemView.findViewById(R.id.activity_subject);
message = itemView.findViewById(R.id.activity_message);
dateTime = itemView.findViewById(R.id.activity_datetime);
list = itemView.findViewById(R.id.list);
}
}

Expand All @@ -384,7 +385,7 @@ private class ActivityViewHeaderHolder extends RecyclerView.ViewHolder {

private ActivityViewHeaderHolder(View itemView) {
super(itemView);
title = (TextView) itemView.findViewById(R.id.title_header);
title = itemView.findViewById(R.id.title_header);

}
}
Expand Down