Skip to content
Snippets Groups Projects
Commit 41ff8f77 authored by Jawnnypoo's avatar Jawnnypoo
Browse files

Remove Uri from Group so that it loads properly

parent 98769f09
No related branches found
No related tags found
No related merge requests found
Pipeline #
Loading
Loading
@@ -20,9 +20,9 @@ public class Group {
@JsonField(name = "description")
String description;
@JsonField(name = "avatar_url")
Uri avatarUrl;
String avatarUrl;
@JsonField(name = "web_url")
Uri webUrl;
String webUrl;
 
public Group() {}
 
Loading
Loading
@@ -42,11 +42,11 @@ public class Group {
return description;
}
 
public Uri getAvatarUrl() {
public String getAvatarUrl() {
return avatarUrl;
}
 
public Uri getWebUrl() {
public String getWebUrl() {
return webUrl;
}
 
Loading
Loading
@@ -56,7 +56,7 @@ public class Group {
return null;
}
 
return Uri.parse(webUrl.toString() + ".atom");
return Uri.parse(webUrl + ".atom");
}
 
@Override
Loading
Loading
package com.commit451.gitlab.viewHolder
 
import android.net.Uri
import android.support.v7.widget.RecyclerView
import android.view.LayoutInflater
import android.view.View
Loading
Loading
@@ -37,7 +36,7 @@ class GroupViewHolder(view: View) : RecyclerView.ViewHolder(view) {
fun bind(group: Group) {
textName.text = group.name
 
if (group.avatarUrl != null && group.avatarUrl != Uri.EMPTY) {
if (!group.avatarUrl.isNullOrEmpty()) {
App.get().picasso
.load(group.avatarUrl)
.into(image)
Loading
Loading
// Top-level build file where you can add configuration options common to all sub-projects/modules.
apply plugin: 'com.github.ben-manes.versions'
apply plugin: 'com.commit451.updatewrapper'
buildscript {
ext.kotlinVersion = '1.1.2-3'
ext.kotlinVersion = '1.1.2-5'
repositories {
jcenter()
maven { url "https://jitpack.io" }
}
dependencies {
classpath 'com.android.tools.build:gradle:2.3.3'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlinVersion"
//check with ./gradlew dependencyUpdates
classpath 'com.github.ben-manes:gradle-versions-plugin:0.15.0'
classpath 'com.github.Commit451:updatewrapper:1.1.1'
}
}
 
plugins {
id 'com.github.ben-manes.versions' version '0.15.0'
}
allprojects {
repositories {
jcenter()
maven { url "https://jitpack.io" }
maven { url "https://maven.google.com" }
google()
}
}
 
Loading
Loading
No preview for this file type
#Tue Feb 21 19:28:36 CST 2017
#Wed Jun 21 10:01:42 CDT 2017
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-3.5-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-4.0-all.zip
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment