diff --git a/app/build.gradle b/app/build.gradle index 6f763839..d1c5c4a9 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -2,7 +2,7 @@ apply plugin: 'com.android.application' android { compileSdkVersion 27 - buildToolsVersion "27.0.1" + buildToolsVersion "27.0.3" defaultConfig { vectorDrawables.useSupportLibrary = true @@ -28,12 +28,12 @@ android { dependencies { implementation fileTree(dir: 'libs', include: ['*.jar']) - implementation 'com.android.support:appcompat-v7:27.0.1' - implementation 'com.android.support:design:27.0.1' - implementation 'com.android.support:support-v4:27.0.1' - implementation 'com.android.support:cardview-v7:27.0.1' - implementation 'com.android.support:recyclerview-v7:27.0.1' - implementation 'com.google.firebase:firebase-crash:11.6.0' + implementation 'com.android.support:appcompat-v7:27.1.0' + implementation 'com.android.support:design:27.1.0' + implementation 'com.android.support:support-v4:27.1.0' + implementation 'com.android.support:cardview-v7:27.1.0' + implementation 'com.android.support:recyclerview-v7:27.1.0' + implementation 'com.google.firebase:firebase-crash:11.8.0' implementation 'com.squareup.okhttp3:okhttp:3.9.0' implementation 'com.squareup.picasso:picasso:2.5.2' implementation 'com.jakewharton.picasso:picasso2-okhttp3-downloader:1.1.0' diff --git a/app/src/main/java/gr/thmmy/mthmmy/activities/main/recent/RecentFragment.java b/app/src/main/java/gr/thmmy/mthmmy/activities/main/recent/RecentFragment.java index 3191cbb9..593b5542 100644 --- a/app/src/main/java/gr/thmmy/mthmmy/activities/main/recent/RecentFragment.java +++ b/app/src/main/java/gr/thmmy/mthmmy/activities/main/recent/RecentFragment.java @@ -153,6 +153,7 @@ public class RecentFragment extends BaseFragment { for (int i = 0; i < recent.size(); i += 3) { String link = recent.get(i).child(0).attr("href"); String title = recent.get(i).child(0).attr("title"); + title = title.trim(); String lastUser = recent.get(i + 1).text(); Pattern pattern = Pattern.compile("\\b (.*)"); diff --git a/app/src/main/java/gr/thmmy/mthmmy/activities/topic/TopicAdapter.java b/app/src/main/java/gr/thmmy/mthmmy/activities/topic/TopicAdapter.java index 8a94d901..6ea8f2c5 100644 --- a/app/src/main/java/gr/thmmy/mthmmy/activities/topic/TopicAdapter.java +++ b/app/src/main/java/gr/thmmy/mthmmy/activities/topic/TopicAdapter.java @@ -203,6 +203,7 @@ class TopicAdapter extends RecyclerView.Adapter { .into(holder.thumbnail); //Sets username,submit date, index number, subject, post's and attached files texts + Timber.i("ASDF " + currentPost.getAuthor()); holder.username.setText(currentPost.getAuthor()); holder.postDate.setText(currentPost.getPostDate()); if (currentPost.getPostNumber() != 0) @@ -274,7 +275,6 @@ class TopicAdapter extends RecyclerView.Adapter { mNumberOfPosts = currentPost.getNumberOfPosts(); mPersonalText = currentPost.getPersonalText(); mNumberOfStars = currentPost.getNumberOfStars(); - mUserColor = currentPost.getUserColor(); } else { mSpecialRank = null; mRank = null; @@ -282,8 +282,8 @@ class TopicAdapter extends RecyclerView.Adapter { mNumberOfPosts = null; mPersonalText = null; mNumberOfStars = 0; - mUserColor = 0; } + mUserColor = currentPost.getUserColor(); if (!Objects.equals(mSpecialRank, "") && mSpecialRank != null) { holder.specialRank.setText(mSpecialRank); diff --git a/app/src/main/java/gr/thmmy/mthmmy/activities/topic/TopicParser.java b/app/src/main/java/gr/thmmy/mthmmy/activities/topic/TopicParser.java index 6a05d83f..b8811ed7 100644 --- a/app/src/main/java/gr/thmmy/mthmmy/activities/topic/TopicParser.java +++ b/app/src/main/java/gr/thmmy/mthmmy/activities/topic/TopicParser.java @@ -223,7 +223,7 @@ class TopicParser { .select("td:has(div.smalltext:containsOwn(Επισκέπτης))[style^=overflow]") .first().text(); p_userName = p_userName.substring(0, p_userName.indexOf(" Επισκέπτης")); - p_userColor = USER_COLOR_BLACK; + p_userColor = USER_COLOR_YELLOW; } else { p_userName = userName.html(); p_profileURL = userName.attr("href"); @@ -283,7 +283,7 @@ class TopicParser { .select("td:has(div.smalltext:containsOwn(Guest))[style^=overflow]") .first().text(); p_userName = p_userName.substring(0, p_userName.indexOf(" Guest")); - p_userColor = USER_COLOR_BLACK; + p_userColor = USER_COLOR_YELLOW; } else { p_userName = userName.html(); p_profileURL = userName.attr("href"); @@ -319,7 +319,7 @@ class TopicParser { try { attachedUrl = new URL(tmpAttachedFileUrlAndName.attr("href")); } catch (MalformedURLException e) { - Timber.e("Attached file malformed url", e); + Timber.e(e, "Attached file malformed url"); break; } String attachedFileName = tmpAttachedFileUrlAndName.text().substring(1); diff --git a/build.gradle b/build.gradle index cee0d09e..d494b63e 100644 --- a/build.gradle +++ b/build.gradle @@ -7,7 +7,7 @@ buildscript { maven { url "https://maven.google.com" } } dependencies { - classpath 'com.android.tools.build:gradle:3.0.0' + classpath 'com.android.tools.build:gradle:3.0.1' classpath 'com.google.gms:google-services:3.1.0' // NOTE: Do not place your application dependencies here; they belong // in the individual module build.gradle files