Skip to content

Commit

Permalink
Replace JCenter to MVN Repository (some dependencies were lost)
Browse files Browse the repository at this point in the history
  • Loading branch information
tretdm committed Sep 14, 2024
1 parent ea35ba7 commit d59e567
Show file tree
Hide file tree
Showing 33 changed files with 301 additions and 182 deletions.
11 changes: 0 additions & 11 deletions app/app.iml
Original file line number Diff line number Diff line change
Expand Up @@ -131,21 +131,15 @@
</content>
<orderEntry type="jdk" jdkName="Android API 29 Platform" jdkType="Android SDK" />
<orderEntry type="sourceFolder" forTests="false" />
<orderEntry type="library" exported="" name="Gradle: com.android.support:preference-v7:24.0.0@aar" level="project" />
<orderEntry type="library" exported="" name="Gradle: com.android.support:recyclerview-v7:24.0.0@aar" level="project" />
<orderEntry type="library" exported="" name="Gradle: com.nineoldandroids:library:2.4.0@jar" level="project" />
<orderEntry type="library" exported="" name="Gradle: com.android.support:support-vector-drawable:24.0.0@aar" level="project" />
<orderEntry type="library" exported="" name="Gradle: com.readystatesoftware.systembartint:systembartint:1.0.3@jar" level="project" />
<orderEntry type="library" exported="" name="Gradle: ch.acra:acra:4.6.0@jar" level="project" />
<orderEntry type="library" exported="" name="Gradle: com.android.support:support-v4:24.0.0@aar" level="project" />
<orderEntry type="library" exported="" name="Gradle: pl.droidsonroids.gif:android-gif-drawable:1.0.12@aar" level="project" />
<orderEntry type="library" exported="" name="Gradle: com.commit451:PhotoView:1.2.5@aar" level="project" />
<orderEntry type="library" exported="" name="Gradle: com.seppius.plurals:android-i18n-plurals:1.1@jar" level="project" />
<orderEntry type="library" exported="" name="Gradle: com.android.support:support-annotations:24.0.0@jar" level="project" />
<orderEntry type="library" exported="" name="Gradle: com.android.support:preference-v14:24.0.0@aar" level="project" />
<orderEntry type="library" exported="" name="Gradle: com.android.support:animated-vector-drawable:24.0.0@aar" level="project" />
<orderEntry type="library" exported="" name="Gradle: com.reginald.swiperefresh:library:1.1.2@aar" level="project" />
<orderEntry type="library" exported="" name="Gradle: com.takisoft.fix:preference-v7:24.0.0.1@aar" level="project" />
<orderEntry type="library" exported="" name="Gradle: org.apmem.tools:layouts:1.8@aar" level="project" />
<orderEntry type="library" exported="" name="Gradle: com.android.support:multidex:1.0.3@aar" level="project" />
<orderEntry type="library" exported="" name="Gradle: com.nostra13.universalimageloader:universal-image-loader:1.9.5@jar" level="project" />
Expand All @@ -155,10 +149,5 @@
<orderEntry type="module" module-name="ovk-api" exported="" />
<orderEntry type="module" module-name="twemojicon" exported="" />
<orderEntry type="module" module-name="popupmenu" exported="" />
<orderEntry type="module" module-name="actionbar" exported="" />
<orderEntry type="module" module-name="wrhttp" exported="" />
<orderEntry type="module" module-name="ovk-api" exported="" />
<orderEntry type="module" module-name="twemojicon" exported="" />
<orderEntry type="module" module-name="popupmenu" exported="" />
</component>
</module>
18 changes: 9 additions & 9 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,8 @@ android {
minSdkVersion 7
//noinspection GradleDependency,OldTargetApi
targetSdkVersion 29
versionCode 241
versionName "1.2.241-u"
versionCode 242
versionName "1.2.242-u"
}
buildTypes {
release {
Expand All @@ -99,16 +99,16 @@ android {
minSdkVersion 7
//noinspection OldTargetApi
targetSdkVersion 29
versionCode 241
versionName "1.2.241-d"
versionCode 242
versionName "1.2.242-d"
signingConfig signingConfigs.debug
}
releaseConfig {
minSdkVersion 7
applicationId 'uk.openvk.android.legacy'
targetSdkVersion 29
versionCode 241
versionName '1.2.241'
versionCode 242
versionName '1.2.242'
if (file('.signing/app-release.prop').exists()) {
signingConfig signingConfigs.release
}
Expand All @@ -119,8 +119,8 @@ android {
minSdkVersion 7
//noinspection OldTargetApi
targetSdkVersion 29
versionCode 241
versionName "1.2.241-f"
versionCode 242
versionName "1.2.242-f"
if (file('.signing/app-fdroid.prop').exists()) {
signingConfig signingConfigs.fdroid
}
Expand Down Expand Up @@ -148,7 +148,7 @@ dependencies {
compile project(':modules:actionbar')
compile project(':modules:popupmenu')
compile 'com.reginald.swiperefresh:library:1.1.2'
compile 'com.seppius.plurals:android-i18n-plurals:1.1'
compile 'com.seppius.plurals:android-i18n-plurals:1.0'
// Android 2.x plurals patch
compile 'com.nostra13.universalimageloader:universal-image-loader:1.9.5'
compile 'ch.acra:acra:4.6.0'
Expand Down
3 changes: 2 additions & 1 deletion app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,8 @@
android:theme="@style/BaseStyleNoTitle"
android:largeHeap="true"
tools:ignore="UnusedAttribute"
android:usesCleartextTraffic="true">
android:usesCleartextTraffic="true"
android:installLocation="auto">

<activity android:name=".core.activities.MainActivity"
android:label="@string/app_name"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -116,13 +116,44 @@ protected void attachBaseContext(Context newBase) {

private void setView() {
ImageView logo = findViewById(R.id.logo);

/* OpenVK Easter Egg Types in "About Application" activity
*
* 0 - not a easter egg
* 2 - adrod 13 installer, ovksome people or freakbarinov
*/

final int[] easterEggType = {0};

logo.setOnLongClickListener(new View.OnLongClickListener() {
@Override
public boolean onLongClick(View v) {
if(logo_longclicks == 2) {
Intent intent = new Intent(getApplicationContext(), DebugMenuActivity.class);
startActivity(intent);
switch (easterEggType[0]) {
default:
Intent intent = new Intent(getApplicationContext(), DebugMenuActivity.class);
startActivity(intent);
break;
case 2:
findViewById(R.id.easter_egg_page).setVisibility(View.VISIBLE);
findViewById(R.id.about_app_page).setVisibility(View.GONE);
if(Build.VERSION.SDK_INT == 33) {
findViewById(R.id.about_app_page).setVisibility(View.GONE);
} else if(Build.VERSION.SDK_INT < 11) {
((ImageView) findViewById(R.id.easter_egg_imageview))
.setImageDrawable(
getResources().getDrawable(R.drawable.ee_freakbarinov)
);
} else {
((ImageView) findViewById(R.id.easter_egg_imageview))
.setImageDrawable(
getResources().getDrawable(R.drawable.ee_ovksome_people)
);
}
break;
}
logo_longclicks = 0;
easterEggType[0]++;
} else {
logo_longclicks++;
}
Expand All @@ -141,7 +172,6 @@ public boolean onLongClick(View v) {
TextView app_links = findViewById(R.id.app_links_text);
TextView app_license_label = findViewById(R.id.app_license_text);
TextView app_disclaimer_label = findViewById(R.id.app_disclaimer_text);
OvkApplication app = ((OvkApplication) getApplicationContext());

app_title.setText(getResources().getString(R.string.full_app_name));
app_version_label.setText(getResources().getString(R.string.app_version_text,
Expand Down Expand Up @@ -243,8 +273,13 @@ public void onClick(DialogInterface dialog, int which) {

@Override
public boolean onOptionsItemSelected(MenuItem item) {
if(item.getItemId() == android.R.id.home) {
onBackPressed();
if(findViewById(R.id.easter_egg_page).getVisibility() == View.GONE) {
if (item.getItemId() == android.R.id.home) {
onBackPressed();
}
} else {
findViewById(R.id.easter_egg_page).setVisibility(View.GONE);
findViewById(R.id.about_app_page).setVisibility(View.VISIBLE);
}
return super.onOptionsItemSelected(item);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -213,6 +213,7 @@ private void createAttachmentsAdapter() {
private void setUiListeners() {
findViewById(R.id.newpost_btn_photo).setOnClickListener(
new View.OnClickListener() {
@SuppressLint("IntentReset")
@Override
public void onClick(View v) {
Intent intent =
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ public class PhotoAlbumActivity extends NetworkActivity {
protected void onCreate(@Nullable Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_photo_album);
ProgressLayout progressLayout = ((ProgressLayout) findViewById(R.id.progress_layout));
ProgressLayout progressLayout = findViewById(R.id.progress_layout);
progressLayout.setVisibility(View.VISIBLE);
progressLayout.enableDarkTheme(true);
if (savedInstanceState == null) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@

import android.annotation.SuppressLint;
import android.content.Context;
import android.content.Intent;
import android.content.res.Configuration;
import android.graphics.Bitmap;
import android.graphics.BitmapFactory;
Expand All @@ -45,7 +44,6 @@
import android.widget.EditText;
import android.widget.ImageButton;
import android.widget.TextView;
import android.widget.Toast;

import dev.tinelix.twemojicon.EmojiconEditText;
import dev.tinelix.twemojicon.EmojiconGridFragment;
Expand All @@ -61,10 +59,7 @@
import uk.openvk.android.legacy.OvkApplication;
import uk.openvk.android.legacy.R;
import uk.openvk.android.client.attachments.Attachment;
import uk.openvk.android.client.entities.Video;
import uk.openvk.android.client.entities.Photo;
import uk.openvk.android.client.models.Wall;
import uk.openvk.android.client.entities.Poll;
import uk.openvk.android.client.enumerations.HandlerMessages;
import uk.openvk.android.client.entities.Comment;
import uk.openvk.android.legacy.core.activities.base.NetworkFragmentActivity;
Expand Down Expand Up @@ -105,7 +100,7 @@ protected void onCreate(Bundle savedInstanceState) {
setContentView(R.layout.activity_wall_post);
instance = instance_prefs.getString("server", "");
((XLinearLayout) findViewById(R.id.comments_view)).setOnKeyboardStateListener(this);
setEmojiconFragment(false);
setEmojiconFragment();
postViewLayout = findViewById(R.id.comments_layout);
postViewLayout.adjustLayoutSize(getResources().getConfiguration().orientation);
commentPanel = findViewById(R.id.comment_panel);
Expand Down Expand Up @@ -467,10 +462,10 @@ public void addAuthorMention(int position) {
}


private void setEmojiconFragment(boolean useSystemDefault) {
private void setEmojiconFragment() {
getSupportFragmentManager()
.beginTransaction()
.replace(R.id.emojicons, EmojiconsFragment.newInstance(useSystemDefault))
.replace(R.id.emojicons, EmojiconsFragment.newInstance(false))
.commit();
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -177,37 +177,47 @@ private void openQualityChooseDialog() {
builder.setView(quality_choose_view);
builder.setNegativeButton(R.string.cancel, null);
final OvkAlertDialog dialog = new OvkAlertDialog(this);
final SeekBar quality_seek = ((SeekBar) quality_choose_view.findViewById(R.id.quality_seek));
final SeekBar quality_seek = quality_choose_view.findViewById(R.id.quality_seek);
final Preference image_quality = findPreference("imageCacheQuality");
builder.setPositiveButton(R.string.ok, new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialogInterface, int i) {
SharedPreferences.Editor editor = global_prefs.edit();
if(quality_seek.getProgress() == 0) {
editor.putString("photos_quality", "low");
} else if(quality_seek.getProgress() == 1) {
editor.putString("photos_quality", "medium");
} else if(quality_seek.getProgress() == 2) {
editor.putString("photos_quality", "high");
} else if(quality_seek.getProgress() == 3) {
editor.putString("photos_quality", "original");
switch (quality_seek.getProgress()) {
case 0:
editor.putString("photos_quality", "low");
break;
case 1:
editor.putString("photos_quality", "medium");
break;
case 2:
editor.putString("photos_quality", "high");
break;
case 3:
editor.putString("photos_quality", "original");
break;
}
editor.commit();
final String[] quality_array = getResources().getStringArray(R.array.sett_cache_quality_array);
if(global_prefs.getString("photos_quality", "").equals("low")) {
image_quality.setSummary(quality_array[0]);
} else if(global_prefs.getString("photos_quality", "").equals("medium")) {
image_quality.setSummary(quality_array[1]);
} else if(global_prefs.getString("photos_quality", "").equals("high")) {
image_quality.setSummary(quality_array[2]);
} else if(global_prefs.getString("photos_quality", "").equals("original")) {
image_quality.setSummary(quality_array[3]);
switch (global_prefs.getString("photos_quality", "")) {
case "low":
image_quality.setSummary(quality_array[0]);
break;
case "medium":
image_quality.setSummary(quality_array[1]);
break;
case "high":
image_quality.setSummary(quality_array[2]);
break;
case "original":
image_quality.setSummary(quality_array[3]);
break;
}
dialog.dismiss();
}
});
final TextView quality_value = ((TextView) quality_choose_view.findViewById(R.id.quality_label));
final TextView quality_comm = ((TextView) quality_choose_view.findViewById(R.id.comment_label));
final TextView quality_value = quality_choose_view.findViewById(R.id.quality_label);
final TextView quality_comm = quality_choose_view.findViewById(R.id.comment_label);
final String[] quality_array = getResources().getStringArray(R.array.sett_cache_quality_array);
quality_seek.setMax(3);

Expand Down Expand Up @@ -265,15 +275,19 @@ public void onStopTrackingTouch(SeekBar seekBar) {
dialog.build(builder, getResources().getString(R.string.sett_cache_quality_alt), "", quality_choose_view);
dialog.show();

if(global_prefs.getString("photos_quality", "").equals("low")) {
quality_seek.setProgress(2);
quality_seek.setProgress(0);
} else if(global_prefs.getString("photos_quality", "").equals("medium")) {
quality_seek.setProgress(1);
} else if(global_prefs.getString("photos_quality", "").equals("high")) {
quality_seek.setProgress(2);
} else if(global_prefs.getString("photos_quality", "").equals("original")) {
quality_seek.setProgress(3);
switch (global_prefs.getString("photos_quality", "")) {
case "low":
quality_seek.setProgress(0);
break;
case "medium":
quality_seek.setProgress(1);
break;
case "high":
quality_seek.setProgress(2);
break;
case "original":
quality_seek.setProgress(3);
break;
}
dialog.show();
}
Expand Down
Loading

0 comments on commit d59e567

Please sign in to comment.