Skip to content

Commit

Permalink
chore: Update Firebase In-App Messaging Display dependency to version…
Browse files Browse the repository at this point in the history
… 21.0.0
  • Loading branch information
sanjay7178 committed Jul 17, 2024
1 parent f7ffbad commit b0f44dc
Show file tree
Hide file tree
Showing 4 changed files with 50 additions and 86 deletions.
1 change: 1 addition & 0 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ dependencies {
implementation 'io.noties.markwon:core:4.6.2'

implementation 'io.reactivex.rxjava3:rxandroid:3.0.0'
implementation 'com.google.firebase:firebase-inappmessaging-display:21.0.0'

debugImplementation 'com.squareup.leakcanary:leakcanary-android:2.8.1'

Expand Down
24 changes: 7 additions & 17 deletions app/google-services.json
Original file line number Diff line number Diff line change
@@ -1,36 +1,26 @@
{
"project_info": {
"project_number": "539771298090",
"project_id": "vit-student",
"storage_bucket": "vit-student.appspot.com"
"project_number": "887863822131",
"project_id": "android-vtop-vitap",
"storage_bucket": "android-vtop-vitap.appspot.com"
},
"client": [
{
"client_info": {
"mobilesdk_app_id": "1:539771298090:android:a6eb9db58d10b87547fe53",
"mobilesdk_app_id": "1:887863822131:android:3675c69c4ebe191638a046",
"android_client_info": {
"package_name": "tk.therealsuji.vtopchennai"
}
},
"oauth_client": [
{
"client_id": "539771298090-jck5f90j4h8lqd0rfhfbitu4oec0rtqo.apps.googleusercontent.com",
"client_type": 3
}
],
"oauth_client": [],
"api_key": [
{
"current_key": "AIzaSyCqiSXHMOq1ty-4adzcFDchAI6ziiQYRnY"
"current_key": "AIzaSyCOdRn8KY1Va6mvftjlPTXVReMKDlLgaXw"
}
],
"services": {
"appinvite_service": {
"other_platform_oauth_client": [
{
"client_id": "539771298090-jck5f90j4h8lqd0rfhfbitu4oec0rtqo.apps.googleusercontent.com",
"client_type": 3
}
]
"other_platform_oauth_client": []
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,13 +67,13 @@
import tk.therealsuji.vtopchennai.receivers.TimetableNotificationReceiver;

public class SettingsRepository {
public static final String APP_BASE_URL = "https://vtopchennai.therealsuji.tk";
public static final String APP_BASE_URL = "https://vitstudent.sanjaydev.site";
public static final String APP_ABOUT_URL = APP_BASE_URL + "/about.json";
public static final String APP_PRIVACY_URL = APP_BASE_URL + "/privacy-policy";
public static final String APP_PRIVACY_URL = "https://vtopchennai.therealsuji.tk" + "/privacy-policy";

public static final String DEVELOPER_BASE_URL = "https://therealsuji.tk";
public static final String DEVELOPER_BASE_URL = "https://sanjay7178.github.io";

public static final String GITHUB_BASE_URL = "https://github.com/therealsujitk/android-vtop-chennai";
public static final String GITHUB_BASE_URL = "https://github.com/sanjay7178/android-vtop-vitap";
public static final String GITHUB_FEATURE_URL = GITHUB_BASE_URL + "/issues";
public static final String GITHUB_ISSUE_URL = GITHUB_BASE_URL + "/issues";

Expand Down
103 changes: 38 additions & 65 deletions app/src/main/java/tk/therealsuji/vtopchennai/services/VTOPService.java
Original file line number Diff line number Diff line change
Expand Up @@ -1651,71 +1651,44 @@ private void downloadExamSchedule() {
"var data = 'semesterSubId=' + '" + semesterID + "' + '&authorizedID=' + $('#authorizedIDX').val() + '&_csrf=' + $('input[name=\"_csrf\"]').val();" +
"var response = {};" +
"$.ajax({" +
" type: 'POST'," +
" url: 'examinations/doSearchExamScheduleForStudent'," +
" data: data," +
" async: false," +
" success: function(res) {" +
" if(res.toLowerCase().includes('not found')) {" +
" return;" +
" }" +
" var doc = new DOMParser().parseFromString(res, 'text/html');" +
" var slotIndex, dateIndex, timingIndex, venueIndex, locationIndex, numberIndex;" +
" var columns = doc.getElementsByTagName('tr')[0].getElementsByTagName('td');" +
" for (var i = 0; i < columns.length; ++i) {" +
" var heading = columns[i].innerText.toLowerCase();" +
" if (heading.includes('slot')) {" +
" slotIndex = i;" +
" } else if (heading.includes('date')) {" +
" dateIndex = i;" +
" } else if (heading.includes('exam') && heading.includes('time')) {" +
" timingIndex = i;" +
" } else if (heading.includes('venue')) {" +
" venueIndex = i;" +
" } else if (heading.includes('location')) {" +
" locationIndex = i;" +
" } else if (heading.includes('seat') && heading.includes('no.')) {" +
" numberIndex = i;" +
" }" +
" }" +
" var examTitle = '', exam = {}, cells = doc.getElementsByTagName('td');" +
" for (var i = columns.length; i < cells.length; ++i) {" +
" if (cells[i].colSpan > 1) {" +
" examTitle = cells[i].innerText.trim();" +
" response[examTitle] = [];" +
" continue;" +
" }" +
" var index = (i - Object.keys(response).length) % columns.length;" +
" if (index == slotIndex) {" +
" exam.slot = cells[i].innerText.trim().split('+')[0];" +
" } else if (index == dateIndex) {" +
" var date = cells[i].innerText.trim().toUpperCase();" +
" exam.date = date == '' ? null : date;" +
" } else if (index == timingIndex) {" +
" var timings = cells[i].innerText.trim().split('-');" +
" if (timings.length == 2) {" +
" exam.start_time = timings[0].trim();" +
" exam.end_time = timings[1].trim();" +
" } else {" +
" exam.start_time = null;" +
" exam.end_time = null;" +
" }" +
" } else if (index == venueIndex) {" +
" var venue = cells[i].innerText.trim();" +
" exam.venue = venue.replace(/-/g,'') == '' ? null : venue;" +
" } else if (index == locationIndex) {" +
" var location = cells[i].innerText.trim();" +
" exam.seat_location = location.replace(/-/g,'') == '' ? null : location;" +
" } else if (index == numberIndex) {" +
" var number = cells[i].innerText.trim();" +
" exam.seat_number = number.replace(/-/g,'') == '' ? null : parseInt(number);" +
" }" +
" if (Object.keys(exam).length == 7) {" +
" response[examTitle].push(exam);" +
" exam = {};" +
" }" +
" }" +
" }" +
"type: 'POST'," +
"url: 'examinations/doSearchExamScheduleForStudent'," +
"data: data," +
"async: false," +
"success: function(res) {" +
"if(res.toLowerCase().includes('not found')) {" +
"return;" +
"}" +
"var doc = new DOMParser().parseFromString(res, 'text/html');" +
"const table = doc.querySelector('.customTable');" +
"const rows = table.querySelectorAll('tr.tableContent');" +
"let result = {};" +
"let currentExamType = '';" +
"function extractSlot(slotText) {" +
"return slotText.split('+')[0];" +
"}" +
"rows.forEach(row => {" +
"if (row.querySelector('.panelHead-secondary')) {" +
"currentExamType = row.textContent.trim();" +
"result[currentExamType] = [];" +
"} else {" +
"const cells = row.querySelectorAll('td');" +
"if (cells.length >= 13) {" +
"const examData = {" +
"slot: extractSlot(cells[5].textContent.trim())," +
"date: cells[6].textContent.trim()," +
"start_time: cells[9].textContent.split('-')[0].trim()," +
"end_time: cells[9].textContent.split('-')[1].trim()," +
"venue: cells[10].textContent.trim()," +
"seat_location: cells[11].textContent.trim()," +
"seat_number: parseInt(cells[12].textContent.trim())" +
"};" +
"result[currentExamType].push(examData);" +
"}" +
"}" +
"});" +
"response = result;" +
"}" +
"});" +
"return response;" +
"})();", responseString -> {
Expand Down

0 comments on commit b0f44dc

Please sign in to comment.