Browse Source

BoardActivity hotfix, up version

pull/70/head
Ezerous 4 years ago
parent
commit
489e9e4162
  1. 6
      app/build.gradle
  2. 10
      app/src/main/java/gr/thmmy/mthmmy/activities/board/BoardActivity.java

6
app/build.gradle

@ -15,8 +15,8 @@ android {
applicationId "gr.thmmy.mthmmy"
minSdkVersion 19
targetSdkVersion 29
versionCode 26
versionName "1.8.3"
versionCode 27
versionName "1.8.4"
archivesBaseName = "mTHMMY-v$versionName"
buildConfigField "String", "CURRENT_BRANCH", "\"" + getCurrentBranch() + "\""
buildConfigField "String", "COMMIT_HASH", "\"" + getCommitHash() + "\""
@ -78,7 +78,7 @@ tasks.whenTaskAdded { task ->
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation project(":emojis")
implementation 'androidx.appcompat:appcompat:1.3.0-alpha01'
implementation 'androidx.appcompat:appcompat:1.3.0-alpha02'
implementation 'androidx.preference:preference:1.1.1'
implementation 'androidx.legacy:legacy-preference-v14:1.0.0'
implementation 'androidx.legacy:legacy-support-v4:1.0.0'

10
app/src/main/java/gr/thmmy/mthmmy/activities/board/BoardActivity.java

@ -189,7 +189,7 @@ public class BoardActivity extends BaseActivity implements BoardAdapter.OnLoadMo
* parameter!</p>
*/
private class BoardTask extends ParseTask {
ArrayList<Board> tempSubboards = new ArrayList<>();
ArrayList<Board> tempSubBoards = new ArrayList<>();
ArrayList<Topic> tempTopics = new ArrayList<>();
@Override
@ -200,7 +200,7 @@ public class BoardActivity extends BaseActivity implements BoardAdapter.OnLoadMo
@Override //TODO should throw ParseException
public void parse(Document boardPage) throws ParseException {
tempSubboards.addAll(parsedSubBoards);
tempSubBoards.addAll(parsedSubBoards);
tempTopics.addAll(parsedTopics);
//Removes loading item
if (isLoadingMore && tempTopics.size() > 0)
@ -292,7 +292,7 @@ public class BoardActivity extends BaseActivity implements BoardAdapter.OnLoadMo
}
}
if(!parsingFailed)
tempSubboards.add(new Board(pUrl, pTitle, pMods, pStats, pLastPost, pLastPostUrl));
tempSubBoards.add(new Board(pUrl, pTitle, pMods, pStats, pLastPost, pLastPostUrl));
else
Timber.e("Parsing failed (pLastPost came with: \"%s\", subBoardColumns html was \"%s\")", pLastPost, subBoardColumns);
}
@ -333,7 +333,7 @@ public class BoardActivity extends BaseActivity implements BoardAdapter.OnLoadMo
continue;
}
pLastPostUrl = topicColumns.last().select("a:has(img)").first().attr("href");
pLastPostUrl = topicColumns.get(6).select("a:has(img)").first().attr("href");
tempTopics.add(new Topic(pTopicUrl, pSubject, pStarter, pLastUser, pLastPostDateTime, pLastPostUrl,
pStats, pLocked, pSticky, pUnread));
}
@ -356,7 +356,7 @@ public class BoardActivity extends BaseActivity implements BoardAdapter.OnLoadMo
parsedTopics.clear();
parsedSubBoards.clear();
parsedTopics.addAll(tempTopics);
parsedSubBoards.addAll(tempSubboards);
parsedSubBoards.addAll(tempSubBoards);
boardAdapter.notifyDataSetChanged();
//Parse was successful

Loading…
Cancel
Save