Skip to content

Commit

Permalink
Merge branch 'hotfix'
Browse files Browse the repository at this point in the history
  • Loading branch information
FranckRJ committed Oct 6, 2020
2 parents 5b23e9c + d3909ea commit 696c462
Show file tree
Hide file tree
Showing 8 changed files with 52 additions and 29 deletions.
11 changes: 10 additions & 1 deletion .idea/codeStyles/Project.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

36 changes: 18 additions & 18 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@ apply plugin: 'kotlin-android-extensions'
apply plugin: 'kotlin-kapt'

android {
compileSdkVersion 29
buildToolsVersion "29.0.3"
compileSdkVersion 30
buildToolsVersion "30.0.2"
defaultConfig {
applicationId "com.franckrj.respawnirc"
minSdkVersion 21
targetSdkVersion 29
versionCode 2_001_2_002
versionName "2.1.2"
targetSdkVersion 30
versionCode 2_001_2_003
versionName "2.1.3"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
resConfigs "fr"
}
Expand Down Expand Up @@ -39,18 +39,18 @@ android {

dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
testImplementation 'junit:junit:4.12'
androidTestImplementation 'androidx.test:runner:1.2.0'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0'
testImplementation 'junit:junit:4.13'
androidTestImplementation 'androidx.test:runner:1.3.0'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.3.0'
implementation 'androidx.activity:activity:1.1.0'
implementation 'androidx.activity:activity-ktx:1.1.0'
implementation 'androidx.appcompat:appcompat:1.1.0'
implementation 'androidx.appcompat:appcompat-resources:1.1.0'
implementation 'androidx.appcompat:appcompat:1.2.0'
implementation 'androidx.appcompat:appcompat-resources:1.2.0'
implementation 'androidx.cardview:cardview:1.0.0'
implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
implementation 'androidx.core:core:1.3.0'
implementation 'androidx.core:core-ktx:1.3.0'
implementation 'androidx.drawerlayout:drawerlayout:1.1.0'
implementation 'androidx.constraintlayout:constraintlayout:2.0.1'
implementation 'androidx.core:core:1.3.2'
implementation 'androidx.core:core-ktx:1.3.2'
implementation 'androidx.drawerlayout:drawerlayout:1.1.1'
implementation 'androidx.emoji:emoji-appcompat:1.1.0'
implementation 'androidx.fragment:fragment:1.2.5'
implementation 'androidx.fragment:fragment-ktx:1.2.5'
Expand All @@ -59,12 +59,12 @@ dependencies {
implementation 'com.github.bumptech.glide:annotations:4.11.0'
implementation 'com.github.bumptech.glide:glide:4.11.0'
implementation 'com.github.bumptech.glide:okhttp3-integration:4.11.0'
implementation 'com.google.android.material:material:1.1.0'
implementation 'com.squareup.okhttp3:okhttp:4.7.2'
implementation 'com.google.android.material:material:1.2.1'
implementation 'com.squareup.okhttp3:okhttp:4.9.0'
implementation 'com.takisoft.preferencex:preferencex:1.0.0'
implementation 'com.takisoft.preferencex:preferencex-colorpicker:1.0.0'
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version"
implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-android:1.3.7'
implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-core:1.3.7'
implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-android:1.3.9'
implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-core:1.3.9'
kapt 'com.github.bumptech.glide:compiler:4.11.0'
}
1 change: 1 addition & 0 deletions app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@
<data android:pathPrefix="/forums/42-"/>
<data android:pathPrefix="/recherche/forums/0-"/>
<data android:pathPattern="/.*/forums/message/.*"/>
<data android:pathPattern="/forums/message/.*"/>
</intent-filter>
</activity>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -93,12 +93,12 @@ public void onClick(DialogInterface dialog, int which) {
break;
}
case POS_COPY_PERMALINK: {
Utils.putStringInClipboard("https://www.jeuxvideo.com/" + pseudoOfMessage.toLowerCase() + "/forums/message/" + idOfMessage, getActivity());
Utils.putStringInClipboard("https://www.jeuxvideo.com/forums/message/" + idOfMessage, getActivity());
Toast.makeText(getActivity(), R.string.copyDone, Toast.LENGTH_SHORT).show();
break;
}
case POS_DDB: {
Utils.openLinkInInternalBrowser("https://www.jeuxvideo.com/" + pseudoOfMessage.toLowerCase() + "/forums/message/" + idOfMessage, getActivity());
Utils.openLinkInInternalBrowser("https://www.jeuxvideo.com/forums/message/" + idOfMessage, getActivity());
break;
}
case POS_SELECT_TEXT: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -244,9 +244,9 @@ public static boolean checkIfItsMessageFormatedLink(String linkToCheck) {
String partOfLinkToCheck = linkToCheck.substring(("https://www.jeuxvideo.com/").length());

if (partOfLinkToCheck.contains("/")) {
partOfLinkToCheck = partOfLinkToCheck.substring(partOfLinkToCheck.indexOf('/'));
String partOfLinkToCheckWithoutFirstPart = partOfLinkToCheck.substring(partOfLinkToCheck.indexOf('/') + 1);

return partOfLinkToCheck.startsWith("/forums/message/");
return partOfLinkToCheck.startsWith("forums/message/") || partOfLinkToCheckWithoutFirstPart.startsWith("forums/message/");
}
}

Expand Down
19 changes: 16 additions & 3 deletions app/src/main/java/com/franckrj/respawnirc/utils/Utils.java
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,15 @@
import android.content.pm.ShortcutManager;
import android.graphics.drawable.Icon;
import android.net.Uri;
import androidx.annotation.ColorInt;
import androidx.emoji.text.EmojiCompat;
import android.text.Spannable;
import android.view.View;
import android.view.inputmethod.InputMethodManager;
import android.webkit.CookieManager;
import android.widget.EditText;

import androidx.annotation.ColorInt;
import androidx.emoji.text.EmojiCompat;

import com.franckrj.respawnirc.MainActivity;
import com.franckrj.respawnirc.R;
import com.franckrj.respawnirc.WebBrowserActivity;
Expand Down Expand Up @@ -135,11 +136,23 @@ public static String imageLinkToFileName(String link) {
public static void setupCookiesForJvc(CookieManager cookieManager) {
cookieManager.removeAllCookies(null);
cookieManager.setCookie("https://www.jeuxvideo.com", "_cmpQcif3pcsupported=1");
cookieManager.setCookie("https://jeuxvideo.com", "_gcl_au=1.1.1298996599.1593456467");
cookieManager.setCookie("https://www.jeuxvideo.com", "euconsent=BO1ximpO1ximpAKAiCENDQAAAAAweAAA");
cookieManager.setCookie("https://www.jeuxvideo.com", "googlepersonalization=O1ximpO1ximpAA");
cookieManager.setCookie("https://www.jeuxvideo.com", "noniabvendorconsent=O1ximpO1ximpAKAiAA8AAA");
cookieManager.setCookie("https://www.jeuxvideo.com", "visitor_country=FR");
cookieManager.setCookie("https://www.jeuxvideo.com", "_gcl_au=1.1.932555791.1601975855");
cookieManager.setCookie("https://www.jeuxvideo.com", "_ga=GA1.2.314248087.1601975855");
cookieManager.setCookie("https://www.jeuxvideo.com", "_gid=GA1.2.241172429.1601975855");
cookieManager.setCookie("https://www.jeuxvideo.com", "_gat=1");
cookieManager.setCookie("https://www.jeuxvideo.com", "didomi_token=eyJ1c2VyX2lkIjoiMTc0ZmQzM2EtMjRjNy02OWEyLWE1YjMtZjdlYzA3YWYxNjU3IiwiY3JlYXRlZCI6IjIwMjAtMTAtMDZUMDk6MjA6MDYuMzU4WiIsInVwZGF0ZWQiOiIyMDIwLTEwLTA2VDA5OjIwOjA2LjM1OFoiLCJ2ZXJzaW9uIjoyLCJwdXJwb3NlcyI6eyJlbmFibGVkIjpbImRldmljZV9jaGFyYWN0ZXJpc3RpY3MiLCJnZW9sb2NhdGlvbl9kYXRhIl19LCJ2ZW5kb3JzIjp7ImVuYWJsZWQiOlsiZ29vZ2xlIiwiYzpkbXB3ZWJlZGktblRCSEFrNDQiLCJjOmJhdGNoLWJKdEd0dHhMIiwiYzphbWF6b250YW0tZVk0aU40TlYiLCJjOndhcm5lcmJyby1BUEpXeUFHUCIsImM6c25hcGNoYXQtaFcyck1KZlkiLCJjOnRpa3Rvay1XYnlwQTNaZCIsImM6dHdpdHRlci14YkRFeEpQayIsImM6ZmFjZWJvb2std0RpR25KV1YiXX0sInZlbmRvcnNfbGkiOnsiZW5hYmxlZCI6WyJnb29nbGUiXX19");
cookieManager.setCookie("https://www.jeuxvideo.com", "euconsent-v2=CO62iPAO62iPAAHABBENA5CsAP_AAH_AAAAAGvNf_X_fb2_j-_5999t0eY1f9_6_v2wzjgeds-8Nyd_X_L8X62MyvB36pq4KuR4Eu3LBAQdlHOHcTQmQ4IkVqTLsbk2Mq7NKJ7LEilMbM2dYGH9vn9XTuZKY70_s___z_3-_-___77f_r-3_3_A14Akw1L4CDMSxgJJo0qhRAhCuJDoAQAUUIwtElhASuCnZXAR6ggQAIDUBGBECDEFGLIIAAAAAkoiAEgPBAIgCIBAACAFaAhAARIAgsAJAwCAAUA0LACKIJQJCDI4KjlECAqRaKCeSMCSC52MMIAAA.f_gAD_gAAAAA");
cookieManager.setCookie("https://jeuxvideo.com", "_gcl_au=1.1.1298996599.1593456467");
cookieManager.setCookie("https://jeuxvideo.com", "_gcl_au=1.1.932555791.1601975855");
cookieManager.setCookie("https://jeuxvideo.com", "_ga=GA1.2.314248087.1601975855");
cookieManager.setCookie("https://jeuxvideo.com", "_gid=GA1.2.241172429.1601975855");
cookieManager.setCookie("https://jeuxvideo.com", "_gat=1");
cookieManager.setCookie("https://jeuxvideo.com", "didomi_token=eyJ1c2VyX2lkIjoiMTc0ZmQzM2EtMjRjNy02OWEyLWE1YjMtZjdlYzA3YWYxNjU3IiwiY3JlYXRlZCI6IjIwMjAtMTAtMDZUMDk6MjA6MDYuMzU4WiIsInVwZGF0ZWQiOiIyMDIwLTEwLTA2VDA5OjIwOjA2LjM1OFoiLCJ2ZXJzaW9uIjoyLCJwdXJwb3NlcyI6eyJlbmFibGVkIjpbImRldmljZV9jaGFyYWN0ZXJpc3RpY3MiLCJnZW9sb2NhdGlvbl9kYXRhIl19LCJ2ZW5kb3JzIjp7ImVuYWJsZWQiOlsiZ29vZ2xlIiwiYzpkbXB3ZWJlZGktblRCSEFrNDQiLCJjOmJhdGNoLWJKdEd0dHhMIiwiYzphbWF6b250YW0tZVk0aU40TlYiLCJjOndhcm5lcmJyby1BUEpXeUFHUCIsImM6c25hcGNoYXQtaFcyck1KZlkiLCJjOnRpa3Rvay1XYnlwQTNaZCIsImM6dHdpdHRlci14YkRFeEpQayIsImM6ZmFjZWJvb2std0RpR25KV1YiXX0sInZlbmRvcnNfbGkiOnsiZW5hYmxlZCI6WyJnb29nbGUiXX19");
cookieManager.setCookie("https://jeuxvideo.com", "euconsent-v2=CO62iPAO62iPAAHABBENA5CsAP_AAH_AAAAAGvNf_X_fb2_j-_5999t0eY1f9_6_v2wzjgeds-8Nyd_X_L8X62MyvB36pq4KuR4Eu3LBAQdlHOHcTQmQ4IkVqTLsbk2Mq7NKJ7LEilMbM2dYGH9vn9XTuZKY70_s___z_3-_-___77f_r-3_3_A14Akw1L4CDMSxgJJo0qhRAhCuJDoAQAUUIwtElhASuCnZXAR6ggQAIDUBGBECDEFGLIIAAAAAkoiAEgPBAIgCIBAACAFaAhAARIAgsAJAwCAAUA0LACKIJQJCDI4KjlECAqRaKCeSMCSC52MMIAAA.f_gAD_gAAAAA");
}

public static void openCorrespondingBrowser(PrefsManager.LinkType linkTypeToOpenInternalBrowser, String link, Activity parentActivity) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
import java.util.concurrent.Callable;

public class WebManager {
public static final String userAgentString = "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Firefox/78.0";
public static final String userAgentString = "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:82.0) Gecko/20100101 Firefox/82.0";

public static String sendRequestWithMultipleTrys(String linkToPage, String requestMethod, String requestParameters, WebInfos currentInfos, int maxNumberOfTrys) {
int numberOfTrys = 0;
Expand Down
4 changes: 2 additions & 2 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
buildscript {
ext.kotlin_version = '1.3.72'
ext.kotlin_version = '1.4.10'
repositories {
google()
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:4.0.0'
classpath 'com.android.tools.build:gradle:4.0.1'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
}
}
Expand Down

0 comments on commit 696c462

Please sign in to comment.