Skip to content

Commit

Permalink
EOF-12
Browse files Browse the repository at this point in the history
EOF-12
  • Loading branch information
umerov1999 committed May 17, 2023
1 parent 73c243e commit dc61ef1
Show file tree
Hide file tree
Showing 465 changed files with 9,935 additions and 5,704 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Fenrir VK
# Разработка прекращена
# Разработка прекращена! Только эксклюзивные обновления
Первый языческий

<b>Языки: Русский, английский</b>
Expand Down
4 changes: 3 additions & 1 deletion app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/Extra.kt
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,8 @@ object Extra {
const val INDEX = "index"
const val INVERT = "invert"
const val IS_BOARD = "is_board"
const val IS_CHAT = "is_chat"
const val IS_EDIT = "is_edit"
const val IS_OUT_OF_MEMORY = "is_out_of_memory"
const val ITEM_ID = "item_id"
const val KEY = "key"
Expand All @@ -60,12 +62,12 @@ object Extra {
const val MESSAGE_ID = "message_id"
const val METHOD = "method"
const val NEW = "new"
const val NO_OWNER_ID = "no_owner_id"
const val OLD = "old"
const val OUTGOING = "outgoing"
const val OWNER = "owner"
const val OWNERS = "owners"
const val OWNER_ID = "owner_id"
const val NO_OWNER_ID = "no_owner_id"
const val PASSWORD = "password"
const val PATH = "path"
const val PEER = "peer"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ class FcmListenerService : FirebaseMessagingService() {
.notify(accountId)

PushType.POST -> WallPostFCMMessage.fromRemoteMessage(message)
?.nofify(context, accountId)
?.notify(context, accountId)

PushType.COMMENT -> CommentFCMMessage.fromRemoteMessage(message)
?.notify(context, accountId)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ package dev.ragnarok.fenrir.activity

import android.os.Bundle
import dev.ragnarok.fenrir.R
import dev.ragnarok.fenrir.fragment.createpin.CreatePinFragment
import dev.ragnarok.fenrir.fragment.pin.createpin.CreatePinFragment

class CreatePinActivity : NoMainActivity() {
override fun onCreate(savedInstanceState: Bundle?) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ class DeltaOwnerActivity : AppCompatActivity(), PlaceProvider, AppStyleable {
public override fun onCreate(savedInstanceState: Bundle?) {
setTheme(ThemesController.currentStyle())
Utils.prepareDensity(this)
Utils.registerColorsThorVG(this)
super.onCreate(savedInstanceState)
attach(
this,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ import android.os.Bundle
import dev.ragnarok.fenrir.Extra
import dev.ragnarok.fenrir.R
import dev.ragnarok.fenrir.fragment.DualTabPhotosFragment
import dev.ragnarok.fenrir.fragment.localphotos.LocalPhotosFragment
import dev.ragnarok.fenrir.fragment.vkphotos.IVKPhotosView
import dev.ragnarok.fenrir.fragment.vkphotos.VKPhotosFragment
import dev.ragnarok.fenrir.fragment.photos.localphotos.LocalPhotosFragment
import dev.ragnarok.fenrir.fragment.photos.vkphotos.IVKPhotosView
import dev.ragnarok.fenrir.fragment.photos.vkphotos.VKPhotosFragment
import dev.ragnarok.fenrir.getParcelableCompat
import dev.ragnarok.fenrir.getParcelableExtraCompat
import dev.ragnarok.fenrir.model.LocalImageAlbum
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package dev.ragnarok.fenrir.activity
import android.content.Context
import android.os.Bundle
import dev.ragnarok.fenrir.R
import dev.ragnarok.fenrir.fragment.enterpin.EnterPinFragment
import dev.ragnarok.fenrir.fragment.pin.enterpin.EnterPinFragment
import dev.ragnarok.fenrir.util.Utils

open class EnterPinActivity : NoMainActivity() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,7 @@ class LottieActivity : AppCompatActivity() {
public override fun onCreate(savedInstanceState: Bundle?) {
setTheme(currentStyle())
Utils.prepareDensity(this)
Utils.registerColorsThorVG(this)
super.onCreate(savedInstanceState)
setContentView(R.layout.activity_lottie)
lottie = findViewById(R.id.lottie_preview)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@ import dev.ragnarok.fenrir.domain.InteractorFactory
import dev.ragnarok.fenrir.domain.impl.CountersInteractor
import dev.ragnarok.fenrir.fragment.*
import dev.ragnarok.fenrir.fragment.PreferencesFragment.Companion.cleanCache
import dev.ragnarok.fenrir.fragment.abswall.AbsWallFragment
import dev.ragnarok.fenrir.fragment.attachments.commentcreate.CommentCreateFragment
import dev.ragnarok.fenrir.fragment.attachments.commentedit.CommentEditFragment
import dev.ragnarok.fenrir.fragment.attachments.postcreate.PostCreateFragment
Expand All @@ -64,37 +63,35 @@ import dev.ragnarok.fenrir.fragment.audio.catalog_v2.lists.CatalogV2ListFragment
import dev.ragnarok.fenrir.fragment.audio.catalog_v2.sections.CatalogV2SectionFragment
import dev.ragnarok.fenrir.fragment.comments.CommentsFragment
import dev.ragnarok.fenrir.fragment.communities.CommunitiesFragment
import dev.ragnarok.fenrir.fragment.communitycontrol.CommunityControlFragment
import dev.ragnarok.fenrir.fragment.communitycontrol.communityban.CommunityBanEditFragment
import dev.ragnarok.fenrir.fragment.communitycontrol.communityinfocontacts.CommunityInfoContactsFragment
import dev.ragnarok.fenrir.fragment.communitycontrol.communityinfolinks.CommunityInfoLinksFragment
import dev.ragnarok.fenrir.fragment.communitycontrol.communitymanageredit.CommunityManagerEditFragment
import dev.ragnarok.fenrir.fragment.communitycontrol.communitymembers.CommunityMembersFragment
import dev.ragnarok.fenrir.fragment.conversation.ConversationFragmentFactory
import dev.ragnarok.fenrir.fragment.createphotoalbum.CreatePhotoAlbumFragment
import dev.ragnarok.fenrir.fragment.createpin.CreatePinFragment
import dev.ragnarok.fenrir.fragment.createpoll.CreatePollFragment
import dev.ragnarok.fenrir.fragment.communities.communitycontrol.CommunityControlFragment
import dev.ragnarok.fenrir.fragment.communities.communitycontrol.communityban.CommunityBanEditFragment
import dev.ragnarok.fenrir.fragment.communities.communitycontrol.communityinfocontacts.CommunityInfoContactsFragment
import dev.ragnarok.fenrir.fragment.communities.communitycontrol.communityinfolinks.CommunityInfoLinksFragment
import dev.ragnarok.fenrir.fragment.communities.communitycontrol.communitymanageredit.CommunityManagerEditFragment
import dev.ragnarok.fenrir.fragment.communities.communitycontrol.communitymembers.CommunityMembersFragment
import dev.ragnarok.fenrir.fragment.communities.groupchats.GroupChatsFragment
import dev.ragnarok.fenrir.fragment.docs.DocsFragment
import dev.ragnarok.fenrir.fragment.docs.DocsListPresenter
import dev.ragnarok.fenrir.fragment.fave.FaveTabsFragment
import dev.ragnarok.fenrir.fragment.feed.FeedFragment
import dev.ragnarok.fenrir.fragment.feed.feedbanned.FeedBannedFragment
import dev.ragnarok.fenrir.fragment.feed.newsfeedcomments.NewsfeedCommentsFragment
import dev.ragnarok.fenrir.fragment.feed.newsfeedmentions.NewsfeedMentionsFragment
import dev.ragnarok.fenrir.fragment.feedback.FeedbackFragment
import dev.ragnarok.fenrir.fragment.feedbackvkofficial.FeedbackVKOfficialFragment
import dev.ragnarok.fenrir.fragment.feedbanned.FeedBannedFragment
import dev.ragnarok.fenrir.fragment.feedback.feedbackvkofficial.FeedbackVKOfficialFragment
import dev.ragnarok.fenrir.fragment.friends.birthday.BirthDayFragment
import dev.ragnarok.fenrir.fragment.friends.friendsbyphones.FriendsByPhonesFragment
import dev.ragnarok.fenrir.fragment.friends.friendstabs.FriendsTabsFragment
import dev.ragnarok.fenrir.fragment.gifts.GiftsFragment
import dev.ragnarok.fenrir.fragment.groupchats.GroupChatsFragment
import dev.ragnarok.fenrir.fragment.likes.LikesFragment
import dev.ragnarok.fenrir.fragment.likes.storiesview.StoriesViewFragment
import dev.ragnarok.fenrir.fragment.localserver.filemanagerremote.FileManagerRemoteFragment
import dev.ragnarok.fenrir.fragment.localserver.photoslocalserver.PhotosLocalServerFragment
import dev.ragnarok.fenrir.fragment.logs.LogsFragment
import dev.ragnarok.fenrir.fragment.marketview.MarketViewFragment
import dev.ragnarok.fenrir.fragment.messages.chat.ChatFragment
import dev.ragnarok.fenrir.fragment.messages.chat.ChatFragment.Companion.newInstance
import dev.ragnarok.fenrir.fragment.messages.chatmembers.ChatMembersFragment
import dev.ragnarok.fenrir.fragment.messages.conversationattachments.ConversationFragmentFactory
import dev.ragnarok.fenrir.fragment.messages.dialogs.DialogsFragment
import dev.ragnarok.fenrir.fragment.messages.fwds.FwdsFragment
import dev.ragnarok.fenrir.fragment.messages.importantmessages.ImportantMessagesFragment
Expand All @@ -103,13 +100,19 @@ import dev.ragnarok.fenrir.fragment.messages.notreadmessages.NotReadMessagesFrag
import dev.ragnarok.fenrir.fragment.narratives.NarrativesFragment
import dev.ragnarok.fenrir.fragment.navigationedit.DrawerEditFragment
import dev.ragnarok.fenrir.fragment.navigationedit.SideDrawerEditFragment
import dev.ragnarok.fenrir.fragment.newsfeedcomments.NewsfeedCommentsFragment
import dev.ragnarok.fenrir.fragment.newsfeedmentions.NewsfeedMentionsFragment
import dev.ragnarok.fenrir.fragment.ownerarticles.OwnerArticlesFragment
import dev.ragnarok.fenrir.fragment.photoallcomment.PhotoAllCommentFragment
import dev.ragnarok.fenrir.fragment.photos.createphotoalbum.CreatePhotoAlbumFragment
import dev.ragnarok.fenrir.fragment.photos.photoallcomment.PhotoAllCommentFragment
import dev.ragnarok.fenrir.fragment.photos.vkphotoalbums.VKPhotoAlbumsFragment
import dev.ragnarok.fenrir.fragment.photos.vkphotos.IVKPhotosView
import dev.ragnarok.fenrir.fragment.photos.vkphotos.VKPhotosFragment
import dev.ragnarok.fenrir.fragment.pin.createpin.CreatePinFragment
import dev.ragnarok.fenrir.fragment.poll.PollFragment
import dev.ragnarok.fenrir.fragment.productalbums.ProductAlbumsFragment
import dev.ragnarok.fenrir.fragment.poll.createpoll.CreatePollFragment
import dev.ragnarok.fenrir.fragment.poll.voters.VotersFragment
import dev.ragnarok.fenrir.fragment.products.ProductsFragment
import dev.ragnarok.fenrir.fragment.products.marketview.MarketViewFragment
import dev.ragnarok.fenrir.fragment.products.productalbums.ProductAlbumsFragment
import dev.ragnarok.fenrir.fragment.requestexecute.RequestExecuteFragment
import dev.ragnarok.fenrir.fragment.search.AudioSearchTabsFragment
import dev.ragnarok.fenrir.fragment.search.SearchTabsFragment
Expand All @@ -119,19 +122,16 @@ import dev.ragnarok.fenrir.fragment.shortedlinks.ShortedLinksFragment
import dev.ragnarok.fenrir.fragment.theme.ThemeFragment
import dev.ragnarok.fenrir.fragment.topics.TopicsFragment
import dev.ragnarok.fenrir.fragment.userbanned.UserBannedFragment
import dev.ragnarok.fenrir.fragment.userdetails.UserDetailsFragment.Companion.newInstance
import dev.ragnarok.fenrir.fragment.videoalbumsbyvideo.VideoAlbumsByVideoFragment
import dev.ragnarok.fenrir.fragment.videopreview.VideoPreviewFragment
import dev.ragnarok.fenrir.fragment.videos.IVideosListView
import dev.ragnarok.fenrir.fragment.videos.VideosFragment
import dev.ragnarok.fenrir.fragment.videos.VideosTabsFragment
import dev.ragnarok.fenrir.fragment.vkphotoalbums.VKPhotoAlbumsFragment
import dev.ragnarok.fenrir.fragment.vkphotos.IVKPhotosView
import dev.ragnarok.fenrir.fragment.vkphotos.VKPhotosFragment
import dev.ragnarok.fenrir.fragment.voters.VotersFragment
import dev.ragnarok.fenrir.fragment.wallattachments.WallAttachmentsFragmentFactory
import dev.ragnarok.fenrir.fragment.wallattachments.wallsearchcommentsattachments.WallSearchCommentsAttachmentsFragment
import dev.ragnarok.fenrir.fragment.wallpost.WallPostFragment
import dev.ragnarok.fenrir.fragment.videos.videoalbumsbyvideo.VideoAlbumsByVideoFragment
import dev.ragnarok.fenrir.fragment.videos.videopreview.VideoPreviewFragment
import dev.ragnarok.fenrir.fragment.wall.AbsWallFragment
import dev.ragnarok.fenrir.fragment.wall.userdetails.UserDetailsFragment.Companion.newInstance
import dev.ragnarok.fenrir.fragment.wall.wallattachments.WallAttachmentsFragmentFactory
import dev.ragnarok.fenrir.fragment.wall.wallattachments.wallsearchcommentsattachments.WallSearchCommentsAttachmentsFragment
import dev.ragnarok.fenrir.fragment.wall.wallpost.WallPostFragment
import dev.ragnarok.fenrir.link.LinkHelper
import dev.ragnarok.fenrir.listener.*
import dev.ragnarok.fenrir.media.music.MusicPlaybackController
Expand All @@ -149,8 +149,6 @@ import dev.ragnarok.fenrir.model.*
import dev.ragnarok.fenrir.model.drawer.AbsMenuItem
import dev.ragnarok.fenrir.model.drawer.RecentChat
import dev.ragnarok.fenrir.model.drawer.SectionMenuItem
import dev.ragnarok.fenrir.module.FenrirNative
import dev.ragnarok.fenrir.module.thorvg.ThorVGRender
import dev.ragnarok.fenrir.place.Place
import dev.ragnarok.fenrir.place.PlaceFactory
import dev.ragnarok.fenrir.place.PlaceProvider
Expand Down Expand Up @@ -350,18 +348,7 @@ open class MainActivity : AppCompatActivity(), NavigationDrawerCallbacks, OnSect
}
setTheme(currentStyle())
Utils.prepareDensity(this)

if (FenrirNative.isNativeLoaded && getMainActivityTransform() == MainActivityTransforms.MAIN) {
ThorVGRender.registerColors(
mapOf(
"primary_color" to CurrentTheme.getColorPrimary(this),
"secondary_color" to CurrentTheme.getColorSecondary(this),
"on_surface_color" to CurrentTheme.getColorOnSurface(this),
"white_color_contrast_fix" to CurrentTheme.getColorWhiteContrastFix(this),
"black_color_contrast_fix" to CurrentTheme.getColorBlackContrastFix(this)
)
)
}
Utils.registerColorsThorVG(this)

super.onCreate(savedInstanceState)
isActivityDestroyed = false
Expand Down Expand Up @@ -1417,11 +1404,8 @@ open class MainActivity : AppCompatActivity(), NavigationDrawerCallbacks, OnSect
Place.EDIT_COMMENT -> {
val comment: Comment? = args.getParcelableCompat(Extra.COMMENT)
val accountId = args.getLong(Extra.ACCOUNT_ID)
val commemtId = args.getInt(Extra.COMMENT_ID)
val commentEditFragment =
CommentEditFragment.newInstance(accountId, comment, commemtId)
place.applyFragmentListener(commentEditFragment, supportFragmentManager)
attachToFront(commentEditFragment)
val commentId = args.getInt(Extra.COMMENT_ID)
attachToFront(CommentEditFragment.newInstance(accountId, comment, commentId))
}

Place.EDIT_POST -> {
Expand Down Expand Up @@ -1583,9 +1567,7 @@ open class MainActivity : AppCompatActivity(), NavigationDrawerCallbacks, OnSect
Place.UNREAD_MESSAGES -> attachToFront(NotReadMessagesFragment.newInstance(args))
Place.SECURITY -> attachToFront(SecurityPreferencesFragment())
Place.CREATE_POLL -> {
val createPollFragment = CreatePollFragment.newInstance(args)
place.applyFragmentListener(createPollFragment, supportFragmentManager)
attachToFront(createPollFragment)
attachToFront(CreatePollFragment.newInstance(args))
}

Place.COMMENT_CREATE -> openCommentCreatePlace(place)
Expand Down Expand Up @@ -1777,7 +1759,6 @@ open class MainActivity : AppCompatActivity(), NavigationDrawerCallbacks, OnSect
args.getLong(Extra.OWNER_ID),
args.getString(Extra.BODY)
)
place.applyFragmentListener(fragment, supportFragmentManager)
attachToFront(fragment)
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ abstract class NoMainActivity : AppCompatActivity() {
override fun onCreate(savedInstanceState: Bundle?) {
setTheme(currentStyle())
Utils.prepareDensity(this)
Utils.registerColorsThorVG(this)
super.onCreate(savedInstanceState)
isZoomPhoto = Settings.get().other().isDo_zoom_photo
setContentView(getNoMainContentView())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ package dev.ragnarok.fenrir.activity
import android.os.Bundle
import dev.ragnarok.fenrir.Extra
import dev.ragnarok.fenrir.R
import dev.ragnarok.fenrir.fragment.vkphotoalbums.VKPhotoAlbumsFragment
import dev.ragnarok.fenrir.fragment.vkphotos.VKPhotosFragment
import dev.ragnarok.fenrir.fragment.photos.vkphotoalbums.VKPhotoAlbumsFragment
import dev.ragnarok.fenrir.fragment.photos.vkphotos.VKPhotosFragment
import dev.ragnarok.fenrir.place.Place
import dev.ragnarok.fenrir.place.PlaceProvider

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ package dev.ragnarok.fenrir.activity
import android.os.Bundle
import dev.ragnarok.fenrir.Extra
import dev.ragnarok.fenrir.R
import dev.ragnarok.fenrir.fragment.localimagealbums.LocalImageAlbumsFragment
import dev.ragnarok.fenrir.fragment.localphotos.LocalPhotosFragment
import dev.ragnarok.fenrir.fragment.photos.localimagealbums.LocalImageAlbumsFragment
import dev.ragnarok.fenrir.fragment.photos.localphotos.LocalPhotosFragment
import dev.ragnarok.fenrir.getParcelableCompat
import dev.ragnarok.fenrir.model.LocalImageAlbum
import dev.ragnarok.fenrir.place.Place
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ class PostPublishPrepareActivity : AppCompatActivity(), RecyclerMenuAdapter.Acti
override fun onCreate(savedInstanceState: Bundle?) {
setTheme(currentStyle())
Utils.prepareDensity(this)
Utils.registerColorsThorVG(this)
super.onCreate(savedInstanceState)
setContentView(R.layout.activity_post_publish_prepare)
adapter = RecyclerMenuAdapter(R.layout.item_advanced_menu_alternative, emptyList())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,7 @@ class VideoPlayerActivity : AppCompatActivity(), SurfaceHolder.Callback,
override fun onCreate(savedInstanceState: Bundle?) {
setTheme(currentStyle())
Utils.prepareDensity(this)
Utils.registerColorsThorVG(this)
super.onCreate(savedInstanceState)
setContentView(R.layout.activity_video)
val surfaceContainer = findViewById<ViewGroup>(R.id.videoSurfaceContainer)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@ import dev.ragnarok.fenrir.activity.slidr.Slidr.attach
import dev.ragnarok.fenrir.activity.slidr.model.SlidrConfig
import dev.ragnarok.fenrir.activity.slidr.model.SlidrListener
import dev.ragnarok.fenrir.activity.slidr.model.SlidrPosition
import dev.ragnarok.fenrir.fragment.absdocumentpreview.AbsDocumentPreviewActivity
import dev.ragnarok.fenrir.fragment.audio.AudioPlayerFragment
import dev.ragnarok.fenrir.fragment.base.core.IPresenterFactory
import dev.ragnarok.fenrir.fragment.docs.absdocumentpreview.AbsDocumentPreviewActivity
import dev.ragnarok.fenrir.getParcelableArrayListCompat
import dev.ragnarok.fenrir.listener.AppStyleable
import dev.ragnarok.fenrir.model.Document
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import android.os.Bundle
import android.view.View
import com.google.android.material.snackbar.BaseTransientBottomBar
import dev.ragnarok.fenrir.R
import dev.ragnarok.fenrir.fragment.absdocumentpreview.BaseDocumentPresenter
import dev.ragnarok.fenrir.fragment.docs.absdocumentpreview.BaseDocumentPresenter
import dev.ragnarok.fenrir.model.Document
import dev.ragnarok.fenrir.util.AppPerms.hasReadWriteStoragePermission
import dev.ragnarok.fenrir.util.DownloadWorkUtils.doDownloadDoc
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package dev.ragnarok.fenrir.activity.gifpager

import androidx.annotation.StringRes
import dev.ragnarok.fenrir.fragment.absdocumentpreview.IBasicDocumentView
import dev.ragnarok.fenrir.fragment.docs.absdocumentpreview.IBasicDocumentView
import dev.ragnarok.fenrir.model.Document

interface IGifPagerView : IBasicDocumentView {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -473,6 +473,11 @@ class CameraScanActivity : NoMainActivity() {
val height = generatedQRCode.height
val pixels = IntArray(width * height)
generatedQRCode.getPixels(pixels, 0, width, 0, 0, width, height)
for (i in pixels.indices) {
if (Color.alpha(pixels[i]) < 90) {
pixels[i] = Color.WHITE
}
}
val source = RGBLuminanceSource(width, height, pixels)
val binaryBitmap = BinaryBitmap(HybridBinarizer(source))

Expand Down
Loading

0 comments on commit dc61ef1

Please sign in to comment.