From ba34565e5c5bca5d4c9b79d1d3881239580a9d45 Mon Sep 17 00:00:00 2001 From: Artem Umerov Date: Sun, 8 Jan 2023 22:09:58 +0300 Subject: [PATCH] 5 5 --- .../kotlin/dev/ragnarok/fenrir/Constants.kt | 2 +- .../kotlin/dev/ragnarok/fenrir/Extensions.kt | 13 +- .../api/adapters/AudioPlaylistDtoAdapter.kt | 4 +- .../fenrir/api/adapters/PostDtoAdapter.kt | 6 + .../dev/ragnarok/fenrir/api/impl/UploadApi.kt | 16 +- .../dev/ragnarok/fenrir/api/impl/WallApi.kt | 4 +- .../fenrir/api/interfaces/IUploadApi.kt | 8 +- .../ragnarok/fenrir/api/model/VKApiPost.kt | 2 + .../model/response/ResolveDomailResponse.kt | 6 +- .../model/server/VKApiAudioUploadServer.kt | 4 +- .../server/VKApiChatPhotoUploadServer.kt | 4 +- .../api/model/server/VKApiDocsUploadServer.kt | 4 +- .../server/VKApiOwnerPhotoUploadServer.kt | 4 +- .../model/server/VKApiPhotoMessageServer.kt | 8 +- .../model/server/VKApiStoryUploadServer.kt | 4 +- .../api/model/server/VKApiUploadServer.kt | 8 +- .../model/server/VKApiVideosUploadServer.kt | 4 +- .../api/model/server/VKApiWallUploadServer.kt | 8 +- .../ragnarok/fenrir/crypt/ExchangeMessage.kt | 16 +- .../kotlin/dev/ragnarok/fenrir/db/DBHelper.kt | 1 + .../dev/ragnarok/fenrir/db/DatabaseIdRange.kt | 6 +- .../fenrir/db/FenrirContentProvider.kt | 2 + .../ragnarok/fenrir/db/column/PostsColumns.kt | 2 + .../fenrir/db/impl/LocalMediaStorage.kt | 4 +- .../ragnarok/fenrir/db/impl/WallStorage.kt | 2 + .../fenrir/db/model/entity/PostDboEntity.kt | 7 + .../fenrir/domain/impl/MessagesRepository.kt | 10 +- .../fenrir/domain/mappers/Dto2Entity.kt | 1 + .../fenrir/domain/mappers/Dto2Model.kt | 1 + .../fenrir/domain/mappers/Entity2Model.kt | 1 + .../fenrir/domain/mappers/Model2Entity.kt | 1 + .../fenrir/fragment/PreferencesFragment.kt | 3 +- .../AbsAttachmentsEditPresenter.kt | 8 +- .../fragment/audio/audios/AudiosFragment.kt | 6 +- .../audiosbyartist/AudiosByArtistFragment.kt | 6 +- .../AudiosRecommendationFragment.kt | 6 +- .../fragment/base/RecyclerBindableAdapter.kt | 8 +- .../communities/CommunitiesPresenter.kt | 6 +- .../friends/birthday/BirthDayAdapter.kt | 4 +- .../search/criteria/ArtistSearchCriteria.kt | 6 +- .../criteria/AudioPlaylistSearchCriteria.kt | 2 +- .../search/criteria/AudioSearchCriteria.kt | 6 +- .../search/criteria/BaseSearchCriteria.kt | 22 +-- .../search/criteria/DialogsSearchCriteria.kt | 2 +- .../search/criteria/DocumentSearchCriteria.kt | 2 +- .../search/criteria/GroupSearchCriteria.kt | 6 +- .../search/criteria/MessageSearchCriteria.kt | 4 +- .../search/criteria/NewsFeedCriteria.kt | 6 +- .../search/criteria/PeopleSearchCriteria.kt | 8 +- .../search/criteria/PhotoSearchCriteria.kt | 6 +- .../search/criteria/VideoSearchCriteria.kt | 8 +- .../search/criteria/WallSearchCriteria.kt | 4 +- .../fragment/search/nextfrom/IntNextFrom.kt | 4 +- .../search/nextfrom/StringNextFrom.kt | 4 +- .../fragment/search/options/BaseOption.kt | 18 +- .../fragment/search/options/DatabaseOption.kt | 16 +- .../search/options/SimpleBooleanOption.kt | 4 +- .../search/options/SimpleDateOption.kt | 4 +- .../search/options/SimpleGPSOption.kt | 6 +- .../search/options/SimpleNumberOption.kt | 4 +- .../search/options/SimpleTextOption.kt | 4 +- .../fragment/search/options/SpinnerOption.kt | 12 +- .../fenrir/longpoll/NotificationHelper.kt | 4 +- .../dev/ragnarok/fenrir/model/AccessIdPair.kt | 8 +- .../dev/ragnarok/fenrir/model/Account.kt | 6 +- .../dev/ragnarok/fenrir/model/AppChatUser.kt | 16 +- .../dev/ragnarok/fenrir/model/Article.kt | 20 +-- .../ragnarok/fenrir/model/AttachmentEntry.kt | 12 +- .../dev/ragnarok/fenrir/model/Attachments.kt | 50 +++--- .../kotlin/dev/ragnarok/fenrir/model/Audio.kt | 52 +++--- .../dev/ragnarok/fenrir/model/AudioArtist.kt | 16 +- .../ragnarok/fenrir/model/AudioPlaylist.kt | 30 ++-- .../dev/ragnarok/fenrir/model/Banned.kt | 20 +-- .../kotlin/dev/ragnarok/fenrir/model/Call.kt | 10 +- .../kotlin/dev/ragnarok/fenrir/model/Chat.kt | 12 +- .../dev/ragnarok/fenrir/model/ChatConfig.kt | 12 +- .../kotlin/dev/ragnarok/fenrir/model/City.kt | 12 +- .../dev/ragnarok/fenrir/model/Comment.kt | 38 ++-- .../dev/ragnarok/fenrir/model/Commented.kt | 10 +- .../dev/ragnarok/fenrir/model/Community.kt | 72 ++++---- .../ragnarok/fenrir/model/CommunityDetails.kt | 164 +++++++++++++++++- .../fenrir/model/ContactConversation.kt | 16 +- .../dev/ragnarok/fenrir/model/DeltaOwner.kt | 14 +- .../dev/ragnarok/fenrir/model/Dialog.kt | 32 ++-- .../dev/ragnarok/fenrir/model/Document.kt | 48 ++--- .../ragnarok/fenrir/model/DrawerCategory.kt | 6 +- .../kotlin/dev/ragnarok/fenrir/model/Event.kt | 10 +- .../dev/ragnarok/fenrir/model/FaveLink.kt | 12 +- .../dev/ragnarok/fenrir/model/FeedSource.kt | 10 +- .../dev/ragnarok/fenrir/model/FileItem.kt | 16 +- .../dev/ragnarok/fenrir/model/FileRemote.kt | 44 ++--- .../dev/ragnarok/fenrir/model/FriendList.kt | 6 +- .../ragnarok/fenrir/model/FriendsCounters.kt | 10 +- .../dev/ragnarok/fenrir/model/FwdMessages.kt | 4 +- .../kotlin/dev/ragnarok/fenrir/model/Geo.kt | 14 +- .../kotlin/dev/ragnarok/fenrir/model/Gift.kt | 14 +- .../dev/ragnarok/fenrir/model/GiftItem.kt | 10 +- .../dev/ragnarok/fenrir/model/Graffiti.kt | 14 +- .../ragnarok/fenrir/model/GroupSettings.kt | 28 +-- .../kotlin/dev/ragnarok/fenrir/model/Icon.kt | 10 +- .../dev/ragnarok/fenrir/model/IdOption.kt | 8 +- .../dev/ragnarok/fenrir/model/IdPair.kt | 6 +- .../dev/ragnarok/fenrir/model/Keyboard.kt | 24 +-- .../dev/ragnarok/fenrir/model/LastReadId.kt | 4 +- .../kotlin/dev/ragnarok/fenrir/model/Link.kt | 18 +- .../ragnarok/fenrir/model/LocalImageAlbum.kt | 10 +- .../dev/ragnarok/fenrir/model/LocalPhoto.kt | 10 +- .../dev/ragnarok/fenrir/model/LocalVideo.kt | 16 +- .../dev/ragnarok/fenrir/model/Manager.kt | 8 +- .../dev/ragnarok/fenrir/model/Market.kt | 30 ++-- .../dev/ragnarok/fenrir/model/MarketAlbum.kt | 16 +- .../dev/ragnarok/fenrir/model/Message.kt | 68 ++++---- .../dev/ragnarok/fenrir/model/ModelsBundle.kt | 4 +- .../dev/ragnarok/fenrir/model/Narratives.kt | 10 +- .../kotlin/dev/ragnarok/fenrir/model/News.kt | 54 +++--- .../dev/ragnarok/fenrir/model/NotSupported.kt | 6 +- .../kotlin/dev/ragnarok/fenrir/model/Owner.kt | 18 +- .../fenrir/model/ParcelableModelWrapper.kt | 26 +-- .../fenrir/model/ParcelableOwnerWrapper.kt | 48 ++--- .../kotlin/dev/ragnarok/fenrir/model/Peer.kt | 12 +- .../kotlin/dev/ragnarok/fenrir/model/Photo.kt | 84 ++++----- .../dev/ragnarok/fenrir/model/PhotoAlbum.kt | 28 +-- .../ragnarok/fenrir/model/PhotoAlbumEditor.kt | 18 +- .../dev/ragnarok/fenrir/model/PhotoSizes.kt | 72 ++++---- .../kotlin/dev/ragnarok/fenrir/model/Poll.kt | 48 ++--- .../kotlin/dev/ragnarok/fenrir/model/Post.kt | 73 ++++---- .../dev/ragnarok/fenrir/model/PostFilter.kt | 10 +- .../dev/ragnarok/fenrir/model/PostSource.kt | 10 +- .../dev/ragnarok/fenrir/model/Privacy.kt | 12 +- .../fenrir/model/SelectProfileCriteria.kt | 4 +- .../dev/ragnarok/fenrir/model/ShortLink.kt | 14 +- .../ragnarok/fenrir/model/SimplePrivacy.kt | 36 ++-- .../dev/ragnarok/fenrir/model/Sticker.kt | 26 +-- .../ragnarok/fenrir/model/StickersKeywords.kt | 6 +- .../kotlin/dev/ragnarok/fenrir/model/Story.kt | 52 +++--- .../kotlin/dev/ragnarok/fenrir/model/Text.kt | 6 +- .../dev/ragnarok/fenrir/model/TmpSource.kt | 6 +- .../kotlin/dev/ragnarok/fenrir/model/Token.kt | 6 +- .../kotlin/dev/ragnarok/fenrir/model/Topic.kt | 30 ++-- .../kotlin/dev/ragnarok/fenrir/model/User.kt | 112 ++++++------ .../kotlin/dev/ragnarok/fenrir/model/Video.kt | 164 +++++++++--------- .../dev/ragnarok/fenrir/model/VideoAlbum.kt | 16 +- .../dev/ragnarok/fenrir/model/VideoSize.kt | 6 +- .../dev/ragnarok/fenrir/model/VoiceMessage.kt | 20 +-- .../ragnarok/fenrir/model/WallEditorAttrs.kt | 6 +- .../dev/ragnarok/fenrir/model/WallReply.kt | 16 +- .../dev/ragnarok/fenrir/model/WikiPage.kt | 24 +-- .../model/catalog_v2_audio/CatalogV2Layout.kt | 4 +- .../model/catalog_v2_audio/CatalogV2List.kt | 4 +- .../ragnarok/fenrir/model/database/Chair.kt | 6 +- .../ragnarok/fenrir/model/database/Country.kt | 6 +- .../ragnarok/fenrir/model/database/Faculty.kt | 6 +- .../ragnarok/fenrir/model/database/School.kt | 6 +- .../fenrir/model/database/SchoolClazz.kt | 6 +- .../fenrir/model/database/University.kt | 6 +- .../fenrir/model/drawer/AbsMenuItem.kt | 6 +- .../fenrir/model/drawer/DividerMenuItem.kt | 2 +- .../fenrir/model/drawer/IconMenuItem.kt | 4 +- .../fenrir/model/drawer/NoIconMenuItem.kt | 2 +- .../fenrir/model/drawer/RecentChat.kt | 10 +- .../fenrir/model/drawer/SectionMenuItem.kt | 8 +- .../fenrir/model/feedback/CommentFeedback.kt | 6 +- .../fenrir/model/feedback/CopyFeedback.kt | 6 +- .../fenrir/model/feedback/Feedback.kt | 8 +- .../model/feedback/LikeCommentFeedback.kt | 8 +- .../fenrir/model/feedback/LikeFeedback.kt | 6 +- .../model/feedback/MentionCommentFeedback.kt | 6 +- .../fenrir/model/feedback/MentionFeedback.kt | 4 +- .../feedback/ParcelableFeedbackWrapper.kt | 12 +- .../model/feedback/PostPublishFeedback.kt | 4 +- .../model/feedback/ReplyCommentFeedback.kt | 8 +- .../fenrir/model/feedback/UsersFeedback.kt | 4 +- .../model/selection/AbsSelectableSource.kt | 4 +- .../selection/FileManagerSelectableSource.kt | 2 +- .../selection/LocalGallerySelectableSource.kt | 2 +- .../selection/LocalPhotosSelectableSource.kt | 2 +- .../selection/LocalVideosSelectableSource.kt | 2 +- .../fenrir/model/selection/Sources.kt | 16 +- .../selection/VkPhotosSelectableSource.kt | 6 +- .../model/wrappers/SelectablePhotoWrapper.kt | 12 +- .../dev/ragnarok/fenrir/push/VkPlace.kt | 14 +- .../fenrir/service/ChatDownloadWorker.kt | 4 +- .../dev/ragnarok/fenrir/upload/Upload.kt | 24 +-- .../fenrir/upload/UploadDestination.kt | 14 +- .../upload/impl/AudioToMessageUploadable.kt | 12 +- .../fenrir/upload/impl/AudioUploadable.kt | 12 +- .../fenrir/upload/impl/ChatPhotoUploadable.kt | 10 +- .../fenrir/upload/impl/DocumentUploadable.kt | 12 +- .../upload/impl/OwnerPhotoUploadable.kt | 10 +- .../upload/impl/Photo2AlbumUploadable.kt | 10 +- .../upload/impl/Photo2MessageUploadable.kt | 12 +- .../upload/impl/Photo2WallUploadable.kt | 10 +- .../upload/impl/RemoteAudioPlayUploadable.kt | 12 +- .../fenrir/upload/impl/StoryUploadable.kt | 12 +- .../upload/impl/Video2WallUploadable.kt | 12 +- .../upload/impl/VideoToMessageUploadable.kt | 12 +- .../fenrir/upload/impl/VideoUploadable.kt | 12 +- .../dev/ragnarok/fenrir/util/PostDownload.kt | 4 +- .../kotlin/dev/ragnarok/fenrir/util/Utils.kt | 4 +- .../dev/ragnarok/filegallery/Extensions.kt | 13 +- .../filegallery/api/impl/LocalServerApi.kt | 4 +- .../api/interfaces/ILocalServerApi.kt | 2 +- .../model/server/VKApiAudioUploadServer.kt | 40 ----- .../fragment/PreferencesFragment.kt | 12 +- .../dev/ragnarok/filegallery/model/Audio.kt | 30 ++-- .../ragnarok/filegallery/model/FileItem.kt | 22 +-- .../filegallery/model/FileItemSelect.kt | 16 +- .../ragnarok/filegallery/model/FileRemote.kt | 44 ++--- .../dev/ragnarok/filegallery/model/Photo.kt | 44 ++--- .../dev/ragnarok/filegallery/model/Video.kt | 44 ++--- .../ragnarok/filegallery/model/tags/TagDir.kt | 16 +- .../filegallery/model/tags/TagFull.kt | 18 +- .../filegallery/model/tags/TagOwner.kt | 8 +- .../dev/ragnarok/filegallery/upload/Upload.kt | 22 +-- .../filegallery/upload/UploadDestination.kt | 12 +- .../upload/impl/RemoteAudioPlayUploadable.kt | 12 +- build.gradle | 4 +- gradle/wrapper/gradle-wrapper.properties | 2 +- libfenrir/src/main/jni/thorvg/inc/thorvg.h | 30 ++-- .../thorvg/src/lib/sw_engine/tvgSwImage.cpp | 4 +- .../src/lib/sw_engine/tvgSwRasterNeon.h | 2 +- .../src/lib/sw_engine/tvgSwRasterTexmap.h | 4 +- .../src/main/jni/thorvg/src/lib/tvgBezier.cpp | 2 +- .../main/jni/thorvg/src/lib/tvgBinaryDesc.h | 2 +- .../src/main/jni/thorvg/src/lib/tvgMath.h | 2 +- .../main/jni/thorvg/src/lib/tvgPictureImpl.h | 1 - .../src/main/jni/thorvg/src/lib/tvgScene.cpp | 2 +- .../main/jni/thorvg/src/lib/tvgSceneImpl.h | 13 +- .../thorvg/src/loaders/svg/tvgSvgLoader.cpp | 8 +- .../thorvg/src/loaders/svg/tvgXmlParser.cpp | 21 ++- material/build.gradle | 2 +- .../material/datepicker/DateSelector.java | 3 + .../datepicker/MaterialDatePicker.java | 13 ++ .../datepicker/RangeDateSelector.java | 26 ++- .../datepicker/SingleDateSelector.java | 12 ++ .../material/datepicker/res/values/styles.xml | 1 + .../internal/CollapsingTextHelper.java | 2 +- .../material/sidesheet/SideSheetBehavior.java | 57 +++--- .../res/layout/m3_side_sheet_dialog.xml | 1 - .../material/sidesheet/res/values/strings.xml | 3 + .../material/sidesheet/res/values/styles.xml | 2 +- .../android/material/tabs/TabLayout.java | 6 +- .../textfield/IndicatorViewController.java | 14 +- .../material/textfield/TextInputLayout.java | 24 +++ .../textfield/res-public/values/public.xml | 1 + .../material/textfield/res/values/attrs.xml | 2 + .../colorpicker/ColorPickerView.kt | 4 +- viewpager2/build.gradle | 3 + .../recyclerview/widget/ItemTouchHelper.java | 148 ++++++++-------- .../widget/LinearLayoutManager_SavedState.kt | 12 +- .../StaggeredGridLayoutManager_SavedState.kt | 42 ++--- 251 files changed, 2032 insertions(+), 1759 deletions(-) delete mode 100644 app_filegallery/src/main/kotlin/dev/ragnarok/filegallery/api/model/server/VKApiAudioUploadServer.kt diff --git a/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/Constants.kt b/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/Constants.kt index dc52db778..30e026618 100644 --- a/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/Constants.kt +++ b/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/Constants.kt @@ -9,7 +9,7 @@ import java.util.* object Constants { const val API_VERSION = "5.131" - const val DATABASE_FENRIR_VERSION = 25 + const val DATABASE_FENRIR_VERSION = 26 const val DATABASE_TEMPORARY_VERSION = 5 const val EXPORT_SETTINGS_FORMAT = 1 const val forceDeveloperMode = BuildConfig.FORCE_DEVELOPER_MODE diff --git a/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/Extensions.kt b/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/Extensions.kt index c44a591d6..6b9e6809f 100644 --- a/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/Extensions.kt +++ b/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/Extensions.kt @@ -452,10 +452,13 @@ inline fun Parcel.readTypedObjectCompat(c: Parcelable.C } } -inline fun Parcel.writeTypedObjectCompat(`val`: T?, parcelableFlags: Int) { - if (`val` != null) { +inline fun Parcel.writeTypedObjectCompat( + parcel: T?, + parcelableFlags: Int +) { + if (parcel != null) { writeInt(1) - `val`.writeToParcel(this, parcelableFlags) + parcel.writeToParcel(this, parcelableFlags) } else { writeInt(0) } @@ -507,9 +510,9 @@ inline fun Intent.getParcelableArrayListExtraCompat(key } fun Parcel.putBoolean(value: Boolean) { - writeInt(if (value) 1 else 0) + writeByte(if (value) 1 else 0) } fun Parcel.getBoolean(): Boolean { - return readInt() != 0 + return readByte() != 0.toByte() } \ No newline at end of file diff --git a/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/api/adapters/AudioPlaylistDtoAdapter.kt b/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/api/adapters/AudioPlaylistDtoAdapter.kt index baafaac12..a9208dd36 100644 --- a/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/api/adapters/AudioPlaylistDtoAdapter.kt +++ b/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/api/adapters/AudioPlaylistDtoAdapter.kt @@ -31,8 +31,8 @@ class AudioPlaylistDtoAdapter : AbsAdapter("VKApiAudioPlayli continue } if (isFirst) isFirst = false else build.append(", ") - val `val` = optString(i.asJsonObject, "name") - if (`val` != null) build.append(`val`) + val value = optString(i.asJsonObject, "name") + if (value != null) build.append(value) } album.genre = build.toString() } diff --git a/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/api/adapters/PostDtoAdapter.kt b/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/api/adapters/PostDtoAdapter.kt index f5c04c8be..795220426 100644 --- a/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/api/adapters/PostDtoAdapter.kt +++ b/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/api/adapters/PostDtoAdapter.kt @@ -88,6 +88,12 @@ class PostDtoAdapter : AbsAdapter("VKApiPost") { kJson.decodeFromJsonElement(VKApiAttachments.serializer(), it) } } + if (hasObject(root, "donut")) { + val donut = root.getAsJsonObject("donut") + dto.is_donut = optBoolean(donut, "is_donut") + } else { + dto.is_donut = false + } dto.can_edit = optBoolean(root, "can_edit") dto.is_favorite = optBoolean(root, "is_favorite") dto.signer_id = optInt(root, "signer_id") diff --git a/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/api/impl/UploadApi.kt b/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/api/impl/UploadApi.kt index 0908f768b..0f311f08d 100644 --- a/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/api/impl/UploadApi.kt +++ b/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/api/impl/UploadApi.kt @@ -39,11 +39,11 @@ class UploadApi internal constructor(private val provider: IUploadRestProvider) override fun uploadAudioRx( server: String, filename: String?, - `is`: InputStream, + inputStream: InputStream, listener: PercentagePublisher? ): Single { val body = ProgressRequestBody( - `is`, wrapPercentageListener(listener), + inputStream, wrapPercentageListener(listener), "*/*".toMediaTypeOrNull() ) val part: MultipartBody.Part = MultipartBody.Part.createFormData("file", filename, body) @@ -53,11 +53,11 @@ class UploadApi internal constructor(private val provider: IUploadRestProvider) override fun remotePlayAudioRx( server: String, filename: String?, - `is`: InputStream, + inputStream: InputStream, listener: PercentagePublisher? ): Single> { val body = ProgressRequestBody( - `is`, wrapPercentageListener(listener), + inputStream, wrapPercentageListener(listener), "*/*".toMediaTypeOrNull() ) val part: MultipartBody.Part = MultipartBody.Part.createFormData("audio", filename, body) @@ -67,12 +67,12 @@ class UploadApi internal constructor(private val provider: IUploadRestProvider) override fun uploadStoryRx( server: String, filename: String?, - `is`: InputStream, + inputStream: InputStream, listener: PercentagePublisher?, isVideo: Boolean ): Single> { val body = ProgressRequestBody( - `is`, wrapPercentageListener(listener), + inputStream, wrapPercentageListener(listener), "*/*".toMediaTypeOrNull() ) val part: MultipartBody.Part = @@ -142,12 +142,12 @@ class UploadApi internal constructor(private val provider: IUploadRestProvider) override fun uploadPhotoToMessageRx( server: String, - `is`: InputStream, + inputStream: InputStream, listener: PercentagePublisher? ): Single { val body = ProgressRequestBody( - `is`, wrapPercentageListener(listener), + inputStream, wrapPercentageListener(listener), "image/*".toMediaTypeOrNull() ) val part: MultipartBody.Part = MultipartBody.Part.createFormData("photo", "photo.jpg", body) diff --git a/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/api/impl/WallApi.kt b/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/api/impl/WallApi.kt index 7e4720b4d..f213d37a3 100644 --- a/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/api/impl/WallApi.kt +++ b/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/api/impl/WallApi.kt @@ -95,10 +95,10 @@ internal class WallApi(accountId: Int, provider: IServiceProvider) : AbsApi(acco groupId: Int?, markAsAds: Boolean? ): Single { - val `object` = "wall" + postOwnerId + "_" + postId + val obj = "wall" + postOwnerId + "_" + postId return provideService(IWallService(), TokenType.USER) .flatMap { service -> - service.repost(`object`, message, groupId, integerFromBoolean(markAsAds)) + service.repost(obj, message, groupId, integerFromBoolean(markAsAds)) .map(extractResponseWithErrorHandling()) } } diff --git a/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/api/interfaces/IUploadApi.kt b/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/api/interfaces/IUploadApi.kt index 92d00ed6f..4f7d8f609 100644 --- a/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/api/interfaces/IUploadApi.kt +++ b/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/api/interfaces/IUploadApi.kt @@ -17,21 +17,21 @@ interface IUploadApi { fun uploadAudioRx( server: String, filename: String?, - `is`: InputStream, + inputStream: InputStream, listener: PercentagePublisher? ): Single fun remotePlayAudioRx( server: String, filename: String?, - `is`: InputStream, + inputStream: InputStream, listener: PercentagePublisher? ): Single> fun uploadStoryRx( server: String, filename: String?, - `is`: InputStream, + inputStream: InputStream, listener: PercentagePublisher?, isVideo: Boolean ): Single> @@ -63,7 +63,7 @@ interface IUploadApi { fun uploadPhotoToMessageRx( server: String, - `is`: InputStream, + inputStream: InputStream, listener: PercentagePublisher? ): Single diff --git a/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/api/model/VKApiPost.kt b/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/api/model/VKApiPost.kt index 3a665c574..2bf659b97 100644 --- a/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/api/model/VKApiPost.kt +++ b/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/api/model/VKApiPost.kt @@ -110,6 +110,8 @@ class VKApiPost : VKApiAttachment, Commentable, Likeable, Copyable { */ var is_pinned = false + var is_donut = false + /** * List of history of the reposts. */ diff --git a/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/api/model/response/ResolveDomailResponse.kt b/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/api/model/response/ResolveDomailResponse.kt index d150ba955..bda272296 100644 --- a/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/api/model/response/ResolveDomailResponse.kt +++ b/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/api/model/response/ResolveDomailResponse.kt @@ -12,9 +12,9 @@ class ResolveDomailResponse : Parcelable { @Suppress("UNUSED") constructor() - internal constructor(`in`: Parcel) { - type = `in`.readString() - object_id = `in`.readString() + internal constructor(parcel: Parcel) { + type = parcel.readString() + object_id = parcel.readString() } fun parse(jsonObject: JSONObject): ResolveDomailResponse { diff --git a/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/api/model/server/VKApiAudioUploadServer.kt b/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/api/model/server/VKApiAudioUploadServer.kt index 71d8bfccb..09158bd67 100644 --- a/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/api/model/server/VKApiAudioUploadServer.kt +++ b/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/api/model/server/VKApiAudioUploadServer.kt @@ -16,8 +16,8 @@ class VKApiAudioUploadServer : Parcelable, UploadServer { this.url = url } - internal constructor(`in`: Parcel) { - url = `in`.readString() + internal constructor(parcel: Parcel) { + url = parcel.readString() } override fun describeContents(): Int { diff --git a/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/api/model/server/VKApiChatPhotoUploadServer.kt b/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/api/model/server/VKApiChatPhotoUploadServer.kt index 0af00e78e..d77638ba1 100644 --- a/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/api/model/server/VKApiChatPhotoUploadServer.kt +++ b/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/api/model/server/VKApiChatPhotoUploadServer.kt @@ -12,8 +12,8 @@ class VKApiChatPhotoUploadServer : Parcelable, UploadServer { @Suppress("UNUSED") constructor() - internal constructor(`in`: Parcel) { - url = `in`.readString() + internal constructor(parcel: Parcel) { + url = parcel.readString() } override fun describeContents(): Int { diff --git a/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/api/model/server/VKApiDocsUploadServer.kt b/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/api/model/server/VKApiDocsUploadServer.kt index bd5d0385f..e4198b405 100644 --- a/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/api/model/server/VKApiDocsUploadServer.kt +++ b/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/api/model/server/VKApiDocsUploadServer.kt @@ -12,8 +12,8 @@ class VKApiDocsUploadServer : UploadServer, Parcelable { @Suppress("UNUSED") constructor() - internal constructor(`in`: Parcel) { - url = `in`.readString() + internal constructor(parcel: Parcel) { + url = parcel.readString() } override fun describeContents(): Int { diff --git a/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/api/model/server/VKApiOwnerPhotoUploadServer.kt b/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/api/model/server/VKApiOwnerPhotoUploadServer.kt index 7aca72968..cc9361e01 100644 --- a/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/api/model/server/VKApiOwnerPhotoUploadServer.kt +++ b/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/api/model/server/VKApiOwnerPhotoUploadServer.kt @@ -12,8 +12,8 @@ class VKApiOwnerPhotoUploadServer : Parcelable, UploadServer { @Suppress("UNUSED") constructor() - internal constructor(`in`: Parcel) { - url = `in`.readString() + internal constructor(parcel: Parcel) { + url = parcel.readString() } override fun describeContents(): Int { diff --git a/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/api/model/server/VKApiPhotoMessageServer.kt b/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/api/model/server/VKApiPhotoMessageServer.kt index c1850f98d..87ab68df1 100644 --- a/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/api/model/server/VKApiPhotoMessageServer.kt +++ b/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/api/model/server/VKApiPhotoMessageServer.kt @@ -30,10 +30,10 @@ class VKApiPhotoMessageServer : Parcelable, UploadServer { @Suppress("UNUSED") constructor() - internal constructor(`in`: Parcel) { - url = `in`.readString() - album_id = `in`.readInt() - user_id = `in`.readInt() + internal constructor(parcel: Parcel) { + url = parcel.readString() + album_id = parcel.readInt() + user_id = parcel.readInt() } override fun describeContents(): Int { diff --git a/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/api/model/server/VKApiStoryUploadServer.kt b/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/api/model/server/VKApiStoryUploadServer.kt index 0dd6bad74..0430eae1f 100644 --- a/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/api/model/server/VKApiStoryUploadServer.kt +++ b/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/api/model/server/VKApiStoryUploadServer.kt @@ -13,8 +13,8 @@ class VKApiStoryUploadServer : Parcelable, UploadServer { @Suppress("UNUSED") constructor() - internal constructor(`in`: Parcel) { - url = `in`.readString() + internal constructor(parcel: Parcel) { + url = parcel.readString() } override fun describeContents(): Int { diff --git a/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/api/model/server/VKApiUploadServer.kt b/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/api/model/server/VKApiUploadServer.kt index ab9b41f8a..13f04ef55 100644 --- a/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/api/model/server/VKApiUploadServer.kt +++ b/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/api/model/server/VKApiUploadServer.kt @@ -23,10 +23,10 @@ class VKApiUploadServer : Parcelable, UploadServer { */ var user_id = 0 - internal constructor(`in`: Parcel) { - url = `in`.readString() - album_id = `in`.readInt() - user_id = `in`.readInt() + internal constructor(parcel: Parcel) { + url = parcel.readString() + album_id = parcel.readInt() + user_id = parcel.readInt() } @Suppress("UNUSED") diff --git a/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/api/model/server/VKApiVideosUploadServer.kt b/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/api/model/server/VKApiVideosUploadServer.kt index 2ff70ff32..c2170ef6f 100644 --- a/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/api/model/server/VKApiVideosUploadServer.kt +++ b/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/api/model/server/VKApiVideosUploadServer.kt @@ -12,8 +12,8 @@ class VKApiVideosUploadServer : UploadServer, Parcelable { @Suppress("UNUSED") constructor() - internal constructor(`in`: Parcel) { - url = `in`.readString() + internal constructor(parcel: Parcel) { + url = parcel.readString() } override fun describeContents(): Int { diff --git a/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/api/model/server/VKApiWallUploadServer.kt b/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/api/model/server/VKApiWallUploadServer.kt index e6230b6e1..bd7897c3a 100644 --- a/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/api/model/server/VKApiWallUploadServer.kt +++ b/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/api/model/server/VKApiWallUploadServer.kt @@ -25,10 +25,10 @@ class VKApiWallUploadServer : Parcelable, UploadServer { @Suppress("UNUSED") constructor() - internal constructor(`in`: Parcel) { - url = `in`.readString() - album_id = `in`.readInt() - user_id = `in`.readInt() + internal constructor(parcel: Parcel) { + url = parcel.readString() + album_id = parcel.readInt() + user_id = parcel.readInt() } override fun describeContents(): Int { diff --git a/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/crypt/ExchangeMessage.kt b/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/crypt/ExchangeMessage.kt index ab7a033d0..0918f2b0d 100644 --- a/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/crypt/ExchangeMessage.kt +++ b/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/crypt/ExchangeMessage.kt @@ -53,15 +53,15 @@ class ExchangeMessage : Parcelable { keyLocationPolicy = builder.keyLocationPolicy } - internal constructor(`in`: Parcel) { - version = `in`.readInt() - sessionId = `in`.readLong() - publicKey = `in`.readString() - aesKey = `in`.readString() - @SessionState val s = `in`.readInt() + internal constructor(parcel: Parcel) { + version = parcel.readInt() + sessionId = parcel.readLong() + publicKey = parcel.readString() + aesKey = parcel.readString() + @SessionState val s = parcel.readInt() senderSessionState = s - errorCode = `in`.readInt() - @KeyLocationPolicy val klp = readObjectInteger(`in`) + errorCode = parcel.readInt() + @KeyLocationPolicy val klp = readObjectInteger(parcel) keyLocationPolicy = klp } diff --git a/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/db/DBHelper.kt b/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/db/DBHelper.kt index bb354d4e0..e825b0e1e 100644 --- a/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/db/DBHelper.kt +++ b/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/db/DBHelper.kt @@ -672,6 +672,7 @@ class DBHelper private constructor(context: Context, aid: Int) : " [" + PostsColumns.CREATED_BY + "] INTEGER, " + " [" + PostsColumns.CAN_PIN + "] BOOLEAN, " + " [" + PostsColumns.IS_PINNED + "] BOOLEAN, " + + " [" + PostsColumns.IS_DONUT + "] BOOLEAN, " + " [" + PostsColumns.DELETED + "] BOOLEAN, " + " [" + PostsColumns.POST_SOURCE + "] BLOB, " + " [" + PostsColumns.COPYRIGHT_BLOB + "] BLOB, " + diff --git a/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/db/DatabaseIdRange.kt b/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/db/DatabaseIdRange.kt index cf438f391..fb5409903 100644 --- a/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/db/DatabaseIdRange.kt +++ b/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/db/DatabaseIdRange.kt @@ -12,9 +12,9 @@ class DatabaseIdRange : Parcelable { this.last = last } - internal constructor(`in`: Parcel) { - first = `in`.readInt() - last = `in`.readInt() + internal constructor(parcel: Parcel) { + first = parcel.readInt() + last = parcel.readInt() } override fun toString(): String { diff --git a/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/db/FenrirContentProvider.kt b/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/db/FenrirContentProvider.kt index 801ec623a..fdcd712ac 100644 --- a/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/db/FenrirContentProvider.kt +++ b/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/db/FenrirContentProvider.kt @@ -974,6 +974,8 @@ class FenrirContentProvider : ContentProvider() { PostsColumns.FULL_CAN_EDIT sPostsProjectionMap[PostsColumns.IS_FAVORITE] = PostsColumns.FULL_IS_FAVORITE + sPostsProjectionMap[PostsColumns.IS_DONUT] = + PostsColumns.FULL_IS_DONUT sPostsProjectionMap[PostsColumns.REPOSTS_COUNT] = PostsColumns.FULL_REPOSTS_COUNT sPostsProjectionMap[PostsColumns.USER_REPOSTED] = diff --git a/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/db/column/PostsColumns.kt b/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/db/column/PostsColumns.kt index d36162d00..d709fb6f8 100644 --- a/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/db/column/PostsColumns.kt +++ b/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/db/column/PostsColumns.kt @@ -26,6 +26,7 @@ object PostsColumns : BaseColumns { const val SIGNED_ID = "signer_id" const val CREATED_BY = "created_by" const val CAN_PIN = "can_pin" + const val IS_DONUT = "is_donut" const val IS_PINNED = "is_pinned" const val IS_FAVORITE = "is_favorite" const val DELETED = "deleted" @@ -61,4 +62,5 @@ object PostsColumns : BaseColumns { const val FULL_POST_SOURCE = "$TABLENAME.$POST_SOURCE" const val FULL_VIEWS = "$TABLENAME.$VIEWS" const val FULL_IS_FAVORITE = "$TABLENAME.$IS_FAVORITE" + const val FULL_IS_DONUT = "$TABLENAME.$IS_DONUT" } \ No newline at end of file diff --git a/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/db/impl/LocalMediaStorage.kt b/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/db/impl/LocalMediaStorage.kt index 73d1e9ed6..ad0166adf 100644 --- a/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/db/impl/LocalMediaStorage.kt +++ b/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/db/impl/LocalMediaStorage.kt @@ -218,8 +218,8 @@ internal class LocalMediaStorage(mRepositoryContext: AppStorages) : AbsStorage(m return try { mediaMetadataRetriever.setDataSource(context, oo) val cover = mediaMetadataRetriever.embeddedPicture ?: return null - val `is`: InputStream = ByteArrayInputStream(cover) - var bitmap = BitmapFactory.decodeStream(`is`) + val inputStream: InputStream = ByteArrayInputStream(cover) + var bitmap = BitmapFactory.decodeStream(inputStream) if (bitmap != null) { bitmap = Bitmap.createScaledBitmap(bitmap, 256, 256, false) } diff --git a/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/db/impl/WallStorage.kt b/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/db/impl/WallStorage.kt index 7f68667b1..44a3264df 100644 --- a/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/db/impl/WallStorage.kt +++ b/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/db/impl/WallStorage.kt @@ -329,6 +329,7 @@ internal class WallStorage(base: AppStorages) : AbsStorage(base), IWallStorage { .setViews(cursor.getInt(PostsColumns.VIEWS)) .setCanEdit(cursor.getBoolean(PostsColumns.CAN_EDIT)) .setFavorite(cursor.getBoolean(PostsColumns.IS_FAVORITE)) + .setIsDonut(cursor.getBoolean(PostsColumns.IS_DONUT)) val postSourceText = cursor.getBlob(PostsColumns.POST_SOURCE) if (postSourceText.nonNullNoEmpty()) { @@ -441,6 +442,7 @@ internal class WallStorage(base: AppStorages) : AbsStorage(base), IWallStorage { cv.put(PostsColumns.CREATED_BY, dbo.createdBy) cv.put(PostsColumns.CAN_PIN, dbo.isCanPin) cv.put(PostsColumns.IS_PINNED, dbo.isPinned) + cv.put(PostsColumns.IS_DONUT, dbo.isDonut) cv.put(PostsColumns.DELETED, dbo.isDeleted) val attachmentsCount = safeCountOf(dbo.getAttachments()) val copiesCount = safeCountOf(dbo.copyHierarchy) diff --git a/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/db/model/entity/PostDboEntity.kt b/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/db/model/entity/PostDboEntity.kt index 886baa14d..1237b29ee 100644 --- a/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/db/model/entity/PostDboEntity.kt +++ b/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/db/model/entity/PostDboEntity.kt @@ -40,6 +40,8 @@ class PostDboEntity : DboEntity() { private set var isFavorite = false private set + var isDonut = false + private set var isCanPublish = false private set var repostCount = 0 @@ -116,6 +118,11 @@ class PostDboEntity : DboEntity() { return this } + fun setIsDonut(isDonut: Boolean): PostDboEntity { + this.isDonut = isDonut + return this + } + fun setFriendsOnly(friendsOnly: Boolean): PostDboEntity { isFriendsOnly = friendsOnly return this diff --git a/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/domain/impl/MessagesRepository.kt b/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/domain/impl/MessagesRepository.kt index 51b3b2761..89d1e5442 100644 --- a/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/domain/impl/MessagesRepository.kt +++ b/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/domain/impl/MessagesRepository.kt @@ -1574,17 +1574,17 @@ class MessagesRepository( return docsApi.getMessagesUploadServer(dbo.peerId, "audio_message") .flatMap { server -> val file = File(filePath!!) - val `is` = arrayOfNulls(1) + val inputStream = arrayOfNulls(1) try { - `is`[0] = FileInputStream(file) + inputStream[0] = FileInputStream(file) return@flatMap networker.uploads() .uploadDocumentRx( server.url ?: throw NotFoundException("upload url empty"), file.name, - `is`[0]!!, + inputStream[0]!!, null ) - .doFinally(safelyCloseAction(`is`[0])) + .doFinally(safelyCloseAction(inputStream[0])) .flatMap { uploadDto -> docsApi .save(uploadDto.file, null, null) @@ -1602,7 +1602,7 @@ class MessagesRepository( } } } catch (e: FileNotFoundException) { - safelyClose(`is`[0]) + safelyClose(inputStream[0]) return@flatMap Single.error>(e) } } diff --git a/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/domain/mappers/Dto2Entity.kt b/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/domain/mappers/Dto2Entity.kt index caaa2020d..acc1c0f22 100644 --- a/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/domain/mappers/Dto2Entity.kt +++ b/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/domain/mappers/Dto2Entity.kt @@ -1036,6 +1036,7 @@ object Dto2Entity { .setCreatedBy(dto.created_by) .setCanPin(dto.can_pin) .setPinned(dto.is_pinned) + .setIsDonut(dto.is_donut) .setDeleted(false) // cant be deleted .setViews(dto.views) .setCopyright(dto.copyright?.let { PostDboEntity.CopyrightDboEntity(it.name, it.link) }) diff --git a/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/domain/mappers/Dto2Model.kt b/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/domain/mappers/Dto2Model.kt index 01bcf99be..5bad63f46 100644 --- a/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/domain/mappers/Dto2Model.kt +++ b/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/domain/mappers/Dto2Model.kt @@ -1165,6 +1165,7 @@ object Dto2Model { .setCreatorId(dto.created_by) .setCanEdit(dto.can_edit) .setFavorite(dto.is_favorite) + .setIsDonut(dto.is_donut) .setCanPin(dto.can_pin) .setPinned(dto.is_pinned) .setViewCount(dto.views) diff --git a/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/domain/mappers/Entity2Model.kt b/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/domain/mappers/Entity2Model.kt index 6f75e9090..be8af6ee5 100644 --- a/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/domain/mappers/Entity2Model.kt +++ b/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/domain/mappers/Entity2Model.kt @@ -1015,6 +1015,7 @@ object Entity2Model { .setCanEdit(dbo.isCanEdit) .setFavorite(dbo.isFavorite) .setCanPin(dbo.isCanPin) + .setIsDonut(dbo.isDonut) .setPinned(dbo.isPinned) .setViewCount(dbo.views) .setCopyright(dbo.copyright?.let { Post.Copyright(it.name, it.link) }) diff --git a/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/domain/mappers/Model2Entity.kt b/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/domain/mappers/Model2Entity.kt index 7d2f75e89..784f8b6a8 100644 --- a/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/domain/mappers/Model2Entity.kt +++ b/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/domain/mappers/Model2Entity.kt @@ -472,6 +472,7 @@ object Model2Entity { .setCanLike(post.isCanLike) .setCanEdit(post.isCanEdit) .setCanPublish(post.isCanRepost) + .setIsDonut(post.isDonut) .setRepostCount(post.repostCount) .setUserReposted(post.isUserReposted) .setPostType(post.postType) diff --git a/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/fragment/PreferencesFragment.kt b/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/fragment/PreferencesFragment.kt index aabe9fc5b..ed5da78ad 100644 --- a/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/fragment/PreferencesFragment.kt +++ b/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/fragment/PreferencesFragment.kt @@ -1005,8 +1005,7 @@ class PreferencesFragment : AbsPreferencesFragment(), PreferencesAdapter.OnScree titleRes = R.string.chat_background getString()?.let { enableChatPhotoBackground(it.toInt()) } onSelectionChange { - val `val` = it - val index = `val`.toInt() + val index = it.toInt() enableChatPhotoBackground(index) } } diff --git a/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/fragment/attachments/absattachmentsedit/AbsAttachmentsEditPresenter.kt b/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/fragment/attachments/absattachmentsedit/AbsAttachmentsEditPresenter.kt index bbfa2b7f7..7710b1eb4 100644 --- a/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/fragment/attachments/absattachmentsedit/AbsAttachmentsEditPresenter.kt +++ b/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/fragment/attachments/absattachmentsedit/AbsAttachmentsEditPresenter.kt @@ -77,8 +77,8 @@ abstract class AbsAttachmentsEditPresenter interna } if (info != null) { val entry = info.second - val `object` = entry.attachment as Upload - if (`object`.status != Upload.STATUS_UPLOADING) { + val obj = entry.attachment as Upload + if (obj.status != Upload.STATUS_UPLOADING) { continue } view?.updateProgressAtIndex( @@ -389,8 +389,8 @@ abstract class AbsAttachmentsEditPresenter interna private const val SAVE_CURRENT_PHOTO_CAMERA_URI = "save_current_photo_camera_uri" fun createFrom(objects: List?): List { val data: MutableList = ArrayList(objects?.size ?: 0) - for (`object` in objects.orEmpty()) { - data.add(AttachmentEntry(true, `object`)) + for (obj in objects.orEmpty()) { + data.add(AttachmentEntry(true, obj)) } return data } diff --git a/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/fragment/audio/audios/AudiosFragment.kt b/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/fragment/audio/audios/AudiosFragment.kt index 5e5bffcc9..8c78a349f 100644 --- a/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/fragment/audio/audios/AudiosFragment.kt +++ b/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/fragment/audio/audios/AudiosFragment.kt @@ -205,7 +205,7 @@ class AudiosFragment : BaseMvpFragment(), IAudiosV if (tracks.isNotEmpty()) { CheckDirectory(Settings.get().other().musicDir) val account_id = presenter?.accountId ?: Settings.get().accounts().current - var `object` = WorkManager.getInstance(requireActivity()).beginWith( + var obj = WorkManager.getInstance(requireActivity()).beginWith( makeDownloadRequestAudio( tracks[0], account_id ) @@ -221,9 +221,9 @@ class AudiosFragment : BaseMvpFragment(), IAudiosV } Requests.add(makeDownloadRequestAudio(i, account_id)) } - `object` = `object`.then(Requests) + obj = obj.then(Requests) } - `object`.enqueue() + obj.enqueue() } } else { val curr = currentAudio diff --git a/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/fragment/audio/audiosbyartist/AudiosByArtistFragment.kt b/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/fragment/audio/audiosbyartist/AudiosByArtistFragment.kt index 3764b6626..8c2519511 100644 --- a/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/fragment/audio/audiosbyartist/AudiosByArtistFragment.kt +++ b/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/fragment/audio/audiosbyartist/AudiosByArtistFragment.kt @@ -147,7 +147,7 @@ class AudiosByArtistFragment : BaseMvpFragment(private } } - fun indexOf(`object`: T): Int { - return items.indexOf(`object`) + fun indexOf(obj: T): Int { + return items.indexOf(obj) } - fun indexOfAdapter(`object`: T): Int { - val ret = items.indexOf(`object`) + fun indexOfAdapter(obj: T): Int { + val ret = items.indexOf(obj) return if (ret == -1) { ret } else { diff --git a/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/fragment/communities/CommunitiesPresenter.kt b/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/fragment/communities/CommunitiesPresenter.kt index cdbbb58c9..addad8229 100644 --- a/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/fragment/communities/CommunitiesPresenter.kt +++ b/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/fragment/communities/CommunitiesPresenter.kt @@ -375,12 +375,12 @@ class CommunitiesPresenter(accountId: Int, private val userId: Int, savedInstanc ?.contains(lower) == true } - internal fun exist(data: DataWrapper?, `in`: Community?): Boolean { - if (data == null || `in` == null) { + internal fun exist(data: DataWrapper?, community: Community?): Boolean { + if (data == null || community == null) { return false } for (i in 0 until data.size()) { - if (data.get()[i].ownerId == `in`.ownerId) { + if (data.get()[i].ownerId == community.ownerId) { return true } } diff --git a/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/fragment/friends/birthday/BirthDayAdapter.kt b/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/fragment/friends/birthday/BirthDayAdapter.kt index c5bb50265..12292b7e3 100644 --- a/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/fragment/friends/birthday/BirthDayAdapter.kt +++ b/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/fragment/friends/birthday/BirthDayAdapter.kt @@ -22,6 +22,8 @@ import dev.ragnarok.fenrir.util.ViewUtils.getOnlineIcon class BirthDayAdapter(private val mContext: Context, private var mData: List) : RecyclerView.Adapter() { private val transformation: Transformation = CurrentTheme.createTransformationForAvatar() + private val transformationWithStory: Transformation = + CurrentTheme.createTransformationStrokeForAvatar() private var mClickListener: ClickListener? = null override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): BirthDayHolder { return BirthDayHolder( @@ -56,7 +58,7 @@ class BirthDayAdapter(private val mContext: Context, private var mData: List { - override fun createFromParcel(`in`: Parcel): ArtistSearchCriteria { - return ArtistSearchCriteria(`in`) + override fun createFromParcel(parcel: Parcel): ArtistSearchCriteria { + return ArtistSearchCriteria(parcel) } override fun newArray(size: Int): Array { diff --git a/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/fragment/search/criteria/AudioPlaylistSearchCriteria.kt b/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/fragment/search/criteria/AudioPlaylistSearchCriteria.kt index ac47fe7be..50321692c 100644 --- a/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/fragment/search/criteria/AudioPlaylistSearchCriteria.kt +++ b/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/fragment/search/criteria/AudioPlaylistSearchCriteria.kt @@ -5,7 +5,7 @@ import android.os.Parcelable class AudioPlaylistSearchCriteria : BaseSearchCriteria { constructor(query: String?) : super(query) - internal constructor(`in`: Parcel) : super(`in`) + internal constructor(parcel: Parcel) : super(parcel) override fun describeContents(): Int { return 0 diff --git a/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/fragment/search/criteria/AudioSearchCriteria.kt b/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/fragment/search/criteria/AudioSearchCriteria.kt index 3341cd2db..50e4c749d 100644 --- a/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/fragment/search/criteria/AudioSearchCriteria.kt +++ b/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/fragment/search/criteria/AudioSearchCriteria.kt @@ -20,7 +20,7 @@ class AudioSearchCriteria : BaseSearchCriteria { appendOption(SimpleBooleanOption(KEY_SEARCH_WITH_LYRICS, R.string.with_lyrics, true)) } - internal constructor(`in`: Parcel) : super(`in`) + internal constructor(parcel: Parcel) : super(parcel) @Throws(CloneNotSupportedException::class) public override fun clone(): AudioSearchCriteria { @@ -37,8 +37,8 @@ class AudioSearchCriteria : BaseSearchCriteria { @JvmField val CREATOR: Parcelable.Creator = object : Parcelable.Creator { - override fun createFromParcel(`in`: Parcel): AudioSearchCriteria { - return AudioSearchCriteria(`in`) + override fun createFromParcel(parcel: Parcel): AudioSearchCriteria { + return AudioSearchCriteria(parcel) } override fun newArray(size: Int): Array { diff --git a/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/fragment/search/criteria/BaseSearchCriteria.kt b/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/fragment/search/criteria/BaseSearchCriteria.kt index b0cd222f4..c186601c0 100644 --- a/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/fragment/search/criteria/BaseSearchCriteria.kt +++ b/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/fragment/search/criteria/BaseSearchCriteria.kt @@ -17,19 +17,19 @@ open class BaseSearchCriteria : Parcelable, Cloneable { options = ArrayList(optionsCount) } - protected constructor(`in`: Parcel) { - query = `in`.readString() - val optionsSize = `in`.readInt() + protected constructor(parcel: Parcel) { + query = parcel.readString() + val optionsSize = parcel.readInt() options = ArrayList(optionsSize) for (i in 0 until optionsSize) { - when (`in`.readInt()) { - BaseOption.DATABASE -> `in`.readTypedObjectCompat(DatabaseOption.CREATOR) - BaseOption.SIMPLE_BOOLEAN -> `in`.readTypedObjectCompat(SimpleBooleanOption.CREATOR) - BaseOption.SIMPLE_TEXT -> `in`.readTypedObjectCompat(SimpleTextOption.CREATOR) - BaseOption.SIMPLE_NUMBER -> `in`.readTypedObjectCompat(SimpleNumberOption.CREATOR) - BaseOption.SPINNER -> `in`.readTypedObjectCompat(SpinnerOption.CREATOR) - BaseOption.GPS -> `in`.readTypedObjectCompat(SimpleGPSOption.CREATOR) - BaseOption.DATE_TIME -> `in`.readTypedObjectCompat(SimpleDateOption.CREATOR) + when (parcel.readInt()) { + BaseOption.DATABASE -> parcel.readTypedObjectCompat(DatabaseOption.CREATOR) + BaseOption.SIMPLE_BOOLEAN -> parcel.readTypedObjectCompat(SimpleBooleanOption.CREATOR) + BaseOption.SIMPLE_TEXT -> parcel.readTypedObjectCompat(SimpleTextOption.CREATOR) + BaseOption.SIMPLE_NUMBER -> parcel.readTypedObjectCompat(SimpleNumberOption.CREATOR) + BaseOption.SPINNER -> parcel.readTypedObjectCompat(SpinnerOption.CREATOR) + BaseOption.GPS -> parcel.readTypedObjectCompat(SimpleGPSOption.CREATOR) + BaseOption.DATE_TIME -> parcel.readTypedObjectCompat(SimpleDateOption.CREATOR) else -> throw IllegalArgumentException("Unknown option type !!!") }?.let { options.add(it) } } diff --git a/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/fragment/search/criteria/DialogsSearchCriteria.kt b/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/fragment/search/criteria/DialogsSearchCriteria.kt index f40cb285c..be6777f08 100644 --- a/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/fragment/search/criteria/DialogsSearchCriteria.kt +++ b/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/fragment/search/criteria/DialogsSearchCriteria.kt @@ -5,7 +5,7 @@ import android.os.Parcelable class DialogsSearchCriteria : BaseSearchCriteria { constructor(query: String?) : super(query) - internal constructor(`in`: Parcel) : super(`in`) + internal constructor(parcel: Parcel) : super(parcel) companion object CREATOR : Parcelable.Creator { override fun createFromParcel(parcel: Parcel): DialogsSearchCriteria { diff --git a/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/fragment/search/criteria/DocumentSearchCriteria.kt b/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/fragment/search/criteria/DocumentSearchCriteria.kt index 4c69f3d06..29973f2a6 100644 --- a/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/fragment/search/criteria/DocumentSearchCriteria.kt +++ b/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/fragment/search/criteria/DocumentSearchCriteria.kt @@ -5,7 +5,7 @@ import android.os.Parcelable class DocumentSearchCriteria : BaseSearchCriteria { constructor(query: String?) : super(query) - internal constructor(`in`: Parcel) : super(`in`) + internal constructor(parcel: Parcel) : super(parcel) override fun describeContents(): Int { return 0 diff --git a/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/fragment/search/criteria/GroupSearchCriteria.kt b/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/fragment/search/criteria/GroupSearchCriteria.kt index aa5bf33e6..c51282b1a 100644 --- a/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/fragment/search/criteria/GroupSearchCriteria.kt +++ b/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/fragment/search/criteria/GroupSearchCriteria.kt @@ -55,7 +55,7 @@ class GroupSearchCriteria : BaseSearchCriteria { appendOption(futureOnly) } - internal constructor(`in`: Parcel) : super(`in`) + internal constructor(parcel: Parcel) : super(parcel) override fun describeContents(): Int { return 0 @@ -79,8 +79,8 @@ class GroupSearchCriteria : BaseSearchCriteria { @JvmField val CREATOR: Parcelable.Creator = object : Parcelable.Creator { - override fun createFromParcel(`in`: Parcel): GroupSearchCriteria { - return GroupSearchCriteria(`in`) + override fun createFromParcel(parcel: Parcel): GroupSearchCriteria { + return GroupSearchCriteria(parcel) } override fun newArray(size: Int): Array { diff --git a/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/fragment/search/criteria/MessageSearchCriteria.kt b/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/fragment/search/criteria/MessageSearchCriteria.kt index 0c3cb7012..478658c37 100644 --- a/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/fragment/search/criteria/MessageSearchCriteria.kt +++ b/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/fragment/search/criteria/MessageSearchCriteria.kt @@ -14,8 +14,8 @@ class MessageSearchCriteria : BaseSearchCriteria { //appendOption(new SimpleBooleanOption(1, R.string.photo, true)); } - internal constructor(`in`: Parcel) : super(`in`) { - peerId = readObjectInteger(`in`) + internal constructor(parcel: Parcel) : super(parcel) { + peerId = readObjectInteger(parcel) } fun setPeerId(peerId: Int?): MessageSearchCriteria { diff --git a/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/fragment/search/criteria/NewsFeedCriteria.kt b/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/fragment/search/criteria/NewsFeedCriteria.kt index 92fd41fbc..32fd1e420 100644 --- a/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/fragment/search/criteria/NewsFeedCriteria.kt +++ b/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/fragment/search/criteria/NewsFeedCriteria.kt @@ -13,7 +13,7 @@ class NewsFeedCriteria : BaseSearchCriteria { appendOption(SimpleDateOption(KEY_END_TIME, R.string.date_to, true)) } - internal constructor(`in`: Parcel) : super(`in`) + internal constructor(parcel: Parcel) : super(parcel) override fun describeContents(): Int { return 0 @@ -27,8 +27,8 @@ class NewsFeedCriteria : BaseSearchCriteria { @JvmField val CREATOR: Parcelable.Creator = object : Parcelable.Creator { - override fun createFromParcel(`in`: Parcel): NewsFeedCriteria { - return NewsFeedCriteria(`in`) + override fun createFromParcel(parcel: Parcel): NewsFeedCriteria { + return NewsFeedCriteria(parcel) } override fun newArray(size: Int): Array { diff --git a/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/fragment/search/criteria/PeopleSearchCriteria.kt b/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/fragment/search/criteria/PeopleSearchCriteria.kt index 5cb73aab3..2c87b3d01 100644 --- a/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/fragment/search/criteria/PeopleSearchCriteria.kt +++ b/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/fragment/search/criteria/PeopleSearchCriteria.kt @@ -141,8 +141,8 @@ class PeopleSearchCriteria : BaseSearchCriteria { appendOption(fromListOption) } - internal constructor(`in`: Parcel) : super(`in`) { - groupId = readObjectInteger(`in`) + internal constructor(parcel: Parcel) : super(parcel) { + groupId = readObjectInteger(parcel) } override fun writeToParcel(dest: Parcel, flags: Int) { @@ -202,8 +202,8 @@ class PeopleSearchCriteria : BaseSearchCriteria { @JvmField val CREATOR: Parcelable.Creator = object : Parcelable.Creator { - override fun createFromParcel(`in`: Parcel): PeopleSearchCriteria { - return PeopleSearchCriteria(`in`) + override fun createFromParcel(parcel: Parcel): PeopleSearchCriteria { + return PeopleSearchCriteria(parcel) } override fun newArray(size: Int): Array { diff --git a/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/fragment/search/criteria/PhotoSearchCriteria.kt b/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/fragment/search/criteria/PhotoSearchCriteria.kt index 1191c94ea..168a8ed13 100644 --- a/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/fragment/search/criteria/PhotoSearchCriteria.kt +++ b/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/fragment/search/criteria/PhotoSearchCriteria.kt @@ -21,7 +21,7 @@ class PhotoSearchCriteria : BaseSearchCriteria { appendOption(SimpleDateOption(KEY_END_TIME, R.string.date_to, true)) } - internal constructor(`in`: Parcel) : super(`in`) + internal constructor(parcel: Parcel) : super(parcel) override fun describeContents(): Int { return 0 @@ -42,8 +42,8 @@ class PhotoSearchCriteria : BaseSearchCriteria { @JvmField val CREATOR: Parcelable.Creator = object : Parcelable.Creator { - override fun createFromParcel(`in`: Parcel): PhotoSearchCriteria { - return PhotoSearchCriteria(`in`) + override fun createFromParcel(parcel: Parcel): PhotoSearchCriteria { + return PhotoSearchCriteria(parcel) } override fun newArray(size: Int): Array { diff --git a/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/fragment/search/criteria/VideoSearchCriteria.kt b/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/fragment/search/criteria/VideoSearchCriteria.kt index d5429642b..cec9f9915 100644 --- a/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/fragment/search/criteria/VideoSearchCriteria.kt +++ b/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/fragment/search/criteria/VideoSearchCriteria.kt @@ -42,8 +42,8 @@ class VideoSearchCriteria : BaseSearchCriteria { appendOption(SimpleNumberOption(KEY_DURATION_TO, R.string.max_duration, true)) } - internal constructor(`in`: Parcel) : super(`in`) { - action = `in`.readString() + internal constructor(parcel: Parcel) : super(parcel) { + action = parcel.readString() } override fun describeContents(): Int { @@ -77,8 +77,8 @@ class VideoSearchCriteria : BaseSearchCriteria { @JvmField val CREATOR: Parcelable.Creator = object : Parcelable.Creator { - override fun createFromParcel(`in`: Parcel): VideoSearchCriteria { - return VideoSearchCriteria(`in`) + override fun createFromParcel(parcel: Parcel): VideoSearchCriteria { + return VideoSearchCriteria(parcel) } override fun newArray(size: Int): Array { diff --git a/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/fragment/search/criteria/WallSearchCriteria.kt b/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/fragment/search/criteria/WallSearchCriteria.kt index d2cba9049..7f392ad54 100644 --- a/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/fragment/search/criteria/WallSearchCriteria.kt +++ b/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/fragment/search/criteria/WallSearchCriteria.kt @@ -10,8 +10,8 @@ class WallSearchCriteria : BaseSearchCriteria { this.ownerId = ownerId } - internal constructor(`in`: Parcel) : super(`in`) { - ownerId = `in`.readInt() + internal constructor(parcel: Parcel) : super(parcel) { + ownerId = parcel.readInt() } override fun writeToParcel(dest: Parcel, flags: Int) { diff --git a/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/fragment/search/nextfrom/IntNextFrom.kt b/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/fragment/search/nextfrom/IntNextFrom.kt index e898b6e51..048fc3a61 100644 --- a/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/fragment/search/nextfrom/IntNextFrom.kt +++ b/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/fragment/search/nextfrom/IntNextFrom.kt @@ -10,8 +10,8 @@ class IntNextFrom : AbsNextFrom { offset = initValue } - internal constructor(`in`: Parcel) { - offset = `in`.readInt() + internal constructor(parcel: Parcel) { + offset = parcel.readInt() } override fun describeContents(): Int { diff --git a/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/fragment/search/nextfrom/StringNextFrom.kt b/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/fragment/search/nextfrom/StringNextFrom.kt index 0fcd3045b..ef6f8db92 100644 --- a/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/fragment/search/nextfrom/StringNextFrom.kt +++ b/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/fragment/search/nextfrom/StringNextFrom.kt @@ -10,8 +10,8 @@ class StringNextFrom : AbsNextFrom { this.nextFrom = nextFrom } - internal constructor(`in`: Parcel) { - nextFrom = `in`.readString() + internal constructor(parcel: Parcel) { + nextFrom = parcel.readString() } override fun describeContents(): Int { diff --git a/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/fragment/search/options/BaseOption.kt b/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/fragment/search/options/BaseOption.kt index 7112e4845..5fdea4e33 100644 --- a/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/fragment/search/options/BaseOption.kt +++ b/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/fragment/search/options/BaseOption.kt @@ -21,13 +21,13 @@ open class BaseOption : Parcelable, Cloneable { parentDependencyKey = NO_DEPENDENCY } - protected constructor(`in`: Parcel) { - optionType = `in`.readInt() - key = `in`.readInt() - active = `in`.getBoolean() - title = `in`.readInt() - parentDependencyKey = `in`.readInt() - childDependencies = `in`.createIntArray() + protected constructor(parcel: Parcel) { + optionType = parcel.readInt() + key = parcel.readInt() + active = parcel.getBoolean() + title = parcel.readInt() + parentDependencyKey = parcel.readInt() + childDependencies = parcel.createIntArray() } fun makeChildDependencies(vararg childs: Int) { @@ -89,8 +89,8 @@ open class BaseOption : Parcelable, Cloneable { @JvmField val CREATOR: Parcelable.Creator = object : Parcelable.Creator { - override fun createFromParcel(`in`: Parcel): BaseOption { - return BaseOption(`in`) + override fun createFromParcel(parcel: Parcel): BaseOption { + return BaseOption(parcel) } override fun newArray(size: Int): Array { diff --git a/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/fragment/search/options/DatabaseOption.kt b/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/fragment/search/options/DatabaseOption.kt index 869907d36..806a461ea 100644 --- a/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/fragment/search/options/DatabaseOption.kt +++ b/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/fragment/search/options/DatabaseOption.kt @@ -26,9 +26,9 @@ class DatabaseOption : BaseOption { this.type = type } - internal constructor(`in`: Parcel) : super(`in`) { - type = `in`.readInt() - value = `in`.readTypedObjectCompat(Entry.CREATOR) + internal constructor(parcel: Parcel) : super(parcel) { + type = parcel.readInt() + value = parcel.readTypedObjectCompat(Entry.CREATOR) } override fun writeToParcel(dest: Parcel, flags: Int) { @@ -77,9 +77,9 @@ class DatabaseOption : BaseOption { this.title = title } - internal constructor(`in`: Parcel) { - id = `in`.readInt() - title = `in`.readString() + internal constructor(parcel: Parcel) { + id = parcel.readInt() + title = parcel.readString() } override fun equals(other: Any?): Boolean { @@ -130,8 +130,8 @@ class DatabaseOption : BaseOption { @JvmField val CREATOR: Parcelable.Creator = object : Parcelable.Creator { - override fun createFromParcel(`in`: Parcel): DatabaseOption { - return DatabaseOption(`in`) + override fun createFromParcel(parcel: Parcel): DatabaseOption { + return DatabaseOption(parcel) } override fun newArray(size: Int): Array { diff --git a/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/fragment/search/options/SimpleBooleanOption.kt b/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/fragment/search/options/SimpleBooleanOption.kt index ea233f689..cfe50640a 100644 --- a/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/fragment/search/options/SimpleBooleanOption.kt +++ b/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/fragment/search/options/SimpleBooleanOption.kt @@ -24,8 +24,8 @@ class SimpleBooleanOption : BaseOption { this.checked = checked } - internal constructor(`in`: Parcel) : super(`in`) { - checked = `in`.getBoolean() + internal constructor(parcel: Parcel) : super(parcel) { + checked = parcel.getBoolean() } override fun writeToParcel(dest: Parcel, flags: Int) { diff --git a/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/fragment/search/options/SimpleDateOption.kt b/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/fragment/search/options/SimpleDateOption.kt index 6418c35ca..eebc9fc05 100644 --- a/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/fragment/search/options/SimpleDateOption.kt +++ b/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/fragment/search/options/SimpleDateOption.kt @@ -7,8 +7,8 @@ class SimpleDateOption : BaseOption { var timeUnix: Long = 0 constructor(key: Int, title: Int, active: Boolean) : super(DATE_TIME, key, title, active) - internal constructor(`in`: Parcel) : super(`in`) { - timeUnix = `in`.readLong() + internal constructor(parcel: Parcel) : super(parcel) { + timeUnix = parcel.readLong() } override fun writeToParcel(dest: Parcel, flags: Int) { diff --git a/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/fragment/search/options/SimpleGPSOption.kt b/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/fragment/search/options/SimpleGPSOption.kt index 9e669b8ca..5e4d292bb 100644 --- a/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/fragment/search/options/SimpleGPSOption.kt +++ b/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/fragment/search/options/SimpleGPSOption.kt @@ -8,9 +8,9 @@ class SimpleGPSOption : BaseOption { var long_gps = 0.0 constructor(key: Int, title: Int, active: Boolean) : super(GPS, key, title, active) - internal constructor(`in`: Parcel) : super(`in`) { - lat_gps = `in`.readDouble() - long_gps = `in`.readDouble() + internal constructor(parcel: Parcel) : super(parcel) { + lat_gps = parcel.readDouble() + long_gps = parcel.readDouble() } fun simpleGPS(): String { diff --git a/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/fragment/search/options/SimpleNumberOption.kt b/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/fragment/search/options/SimpleNumberOption.kt index f4aef417d..c3373ee2b 100644 --- a/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/fragment/search/options/SimpleNumberOption.kt +++ b/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/fragment/search/options/SimpleNumberOption.kt @@ -18,8 +18,8 @@ class SimpleNumberOption : BaseOption { this.value = value } - internal constructor(`in`: Parcel) : super(`in`) { - value = readObjectInteger(`in`) + internal constructor(parcel: Parcel) : super(parcel) { + value = readObjectInteger(parcel) } override fun writeToParcel(dest: Parcel, flags: Int) { diff --git a/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/fragment/search/options/SimpleTextOption.kt b/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/fragment/search/options/SimpleTextOption.kt index a2216c65e..2a4396b3b 100644 --- a/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/fragment/search/options/SimpleTextOption.kt +++ b/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/fragment/search/options/SimpleTextOption.kt @@ -7,8 +7,8 @@ class SimpleTextOption : BaseOption { var value: String? = null constructor(key: Int, title: Int, active: Boolean) : super(SIMPLE_TEXT, key, title, active) - internal constructor(`in`: Parcel) : super(`in`) { - value = `in`.readString() + internal constructor(parcel: Parcel) : super(parcel) { + value = parcel.readString() } override fun writeToParcel(dest: Parcel, flags: Int) { diff --git a/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/fragment/search/options/SpinnerOption.kt b/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/fragment/search/options/SpinnerOption.kt index 809910d0b..ab243a95a 100644 --- a/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/fragment/search/options/SpinnerOption.kt +++ b/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/fragment/search/options/SpinnerOption.kt @@ -11,9 +11,9 @@ class SpinnerOption : BaseOption { lateinit var available: ArrayList constructor(key: Int, title: Int, active: Boolean) : super(SPINNER, key, title, active) - internal constructor(`in`: Parcel) : super(`in`) { - value = `in`.readTypedObjectCompat(Entry.CREATOR) - available = `in`.createTypedArrayList(Entry.CREATOR)!! + internal constructor(parcel: Parcel) : super(parcel) { + value = parcel.readTypedObjectCompat(Entry.CREATOR) + available = parcel.createTypedArrayList(Entry.CREATOR)!! } @Throws(CloneNotSupportedException::class) @@ -64,9 +64,9 @@ class SpinnerOption : BaseOption { this.name = name } - internal constructor(`in`: Parcel) { - id = `in`.readInt() - name = `in`.readInt() + internal constructor(parcel: Parcel) { + id = parcel.readInt() + name = parcel.readInt() } @Throws(CloneNotSupportedException::class) diff --git a/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/longpoll/NotificationHelper.kt b/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/longpoll/NotificationHelper.kt index 772398218..67211d994 100644 --- a/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/longpoll/NotificationHelper.kt +++ b/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/longpoll/NotificationHelper.kt @@ -624,8 +624,8 @@ object NotificationHelper { " " + response.message ) } - val `is` = response.body.byteStream() - val input = BufferedInputStream(`is`) + val inputStream = response.body.byteStream() + val input = BufferedInputStream(inputStream) val data = ByteArray(80 * 1024) var bufferLength: Int while (input.read(data).also { bufferLength = it } != -1) { diff --git a/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/model/AccessIdPair.kt b/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/model/AccessIdPair.kt index b9dbc337b..a55709ecb 100644 --- a/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/model/AccessIdPair.kt +++ b/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/model/AccessIdPair.kt @@ -14,10 +14,10 @@ class AccessIdPair : Parcelable { this.accessKey = accessKey } - internal constructor(`in`: Parcel) { - id = `in`.readInt() - ownerId = `in`.readInt() - accessKey = `in`.readString() + internal constructor(parcel: Parcel) { + id = parcel.readInt() + ownerId = parcel.readInt() + accessKey = parcel.readString() } fun getId(): Int { diff --git a/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/model/Account.kt b/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/model/Account.kt index 16745a1ff..659f6ca37 100644 --- a/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/model/Account.kt +++ b/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/model/Account.kt @@ -15,9 +15,9 @@ class Account : Parcelable, Identificable { this.owner = owner } - internal constructor(`in`: Parcel) { - id = `in`.readInt() - val wrapper = `in`.readTypedObjectCompat( + internal constructor(parcel: Parcel) { + id = parcel.readInt() + val wrapper = parcel.readTypedObjectCompat( ParcelableOwnerWrapper.CREATOR ) owner = wrapper!!.get() diff --git a/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/model/AppChatUser.kt b/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/model/AppChatUser.kt index 2f3d74ac0..1a076b0bc 100644 --- a/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/model/AppChatUser.kt +++ b/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/model/AppChatUser.kt @@ -22,18 +22,18 @@ class AppChatUser : Parcelable, Identificable { this.invitedBy = invitedBy } - internal constructor(`in`: Parcel) { + internal constructor(parcel: Parcel) { inviter = - `in`.readTypedObjectCompat(ParcelableOwnerWrapper.CREATOR)!! + parcel.readTypedObjectCompat(ParcelableOwnerWrapper.CREATOR)!! .get() member = - `in`.readTypedObjectCompat(ParcelableOwnerWrapper.CREATOR)!! + parcel.readTypedObjectCompat(ParcelableOwnerWrapper.CREATOR)!! .get() - invitedBy = `in`.readInt() - canRemove = `in`.getBoolean() - join_date = `in`.readLong() - isAdmin = `in`.getBoolean() - isOwner = `in`.getBoolean() + invitedBy = parcel.readInt() + canRemove = parcel.getBoolean() + join_date = parcel.readLong() + isAdmin = parcel.getBoolean() + isOwner = parcel.getBoolean() } override fun writeToParcel(dest: Parcel, flags: Int) { diff --git a/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/model/Article.kt b/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/model/Article.kt index 6ee44e100..d4a0882d8 100644 --- a/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/model/Article.kt +++ b/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/model/Article.kt @@ -30,16 +30,16 @@ class Article : AbsModel { ownerId = owner_id } - internal constructor(`in`: Parcel) { - id = `in`.readInt() - ownerId = `in`.readInt() - ownerName = `in`.readString() - uRL = `in`.readString() - title = `in`.readString() - subTitle = `in`.readString() - accessKey = `in`.readString() - photo = `in`.readTypedObjectCompat(Photo.CREATOR) - isFavorite = `in`.getBoolean() + internal constructor(parcel: Parcel) { + id = parcel.readInt() + ownerId = parcel.readInt() + ownerName = parcel.readString() + uRL = parcel.readString() + title = parcel.readString() + subTitle = parcel.readString() + accessKey = parcel.readString() + photo = parcel.readTypedObjectCompat(Photo.CREATOR) + isFavorite = parcel.getBoolean() } override fun writeToParcel(parcel: Parcel, flags: Int) { diff --git a/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/model/AttachmentEntry.kt b/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/model/AttachmentEntry.kt index c7f381067..dbabb5b13 100644 --- a/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/model/AttachmentEntry.kt +++ b/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/model/AttachmentEntry.kt @@ -25,16 +25,16 @@ class AttachmentEntry : Parcelable { id = ID_GEN.incrementAndGet() } - internal constructor(`in`: Parcel) { - id = `in`.readInt() + internal constructor(parcel: Parcel) { + id = parcel.readInt() if (id > ID_GEN.toInt()) { ID_GEN.set(id) } - optionalId = `in`.readInt() - isCanDelete = `in`.getBoolean() - isAccompanying = `in`.getBoolean() + optionalId = parcel.readInt() + isCanDelete = parcel.getBoolean() + isAccompanying = parcel.getBoolean() val wrapper: ParcelableModelWrapper = - `in`.readTypedObjectCompat(ParcelableModelWrapper.CREATOR)!! + parcel.readTypedObjectCompat(ParcelableModelWrapper.CREATOR)!! attachment = wrapper.get() } diff --git a/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/model/Attachments.kt b/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/model/Attachments.kt index 06b3b2ebd..14e144a44 100644 --- a/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/model/Attachments.kt +++ b/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/model/Attachments.kt @@ -61,31 +61,31 @@ class Attachments : Parcelable, Cloneable { private set constructor() - internal constructor(`in`: Parcel) { - audios = `in`.createTypedArrayList(Audio.CREATOR) - stickers = `in`.createTypedArrayList(Sticker.CREATOR) - photos = `in`.createTypedArrayList(Photo.CREATOR) - docs = `in`.createTypedArrayList(Document.CREATOR) - videos = `in`.createTypedArrayList(Video.CREATOR) - posts = `in`.createTypedArrayList(Post.CREATOR) - links = `in`.createTypedArrayList(Link.CREATOR) - articles = `in`.createTypedArrayList(Article.CREATOR) - polls = `in`.createTypedArrayList(Poll.CREATOR) - pages = `in`.createTypedArrayList(WikiPage.CREATOR) - voiceMessages = `in`.createTypedArrayList(VoiceMessage.CREATOR) - gifts = `in`.createTypedArrayList(GiftItem.CREATOR) - stories = `in`.createTypedArrayList(Story.CREATOR) - calls = `in`.createTypedArrayList(Call.CREATOR) - geos = `in`.createTypedArrayList(Geo.CREATOR) - audioPlaylists = `in`.createTypedArrayList(AudioPlaylist.CREATOR) - graffity = `in`.createTypedArrayList(Graffiti.CREATOR) - photoAlbums = `in`.createTypedArrayList(PhotoAlbum.CREATOR) - notSupported = `in`.createTypedArrayList(NotSupported.CREATOR) - events = `in`.createTypedArrayList(Event.CREATOR) - markets = `in`.createTypedArrayList(Market.CREATOR) - marketAlbums = `in`.createTypedArrayList(MarketAlbum.CREATOR) - wallReplies = `in`.createTypedArrayList(WallReply.CREATOR) - audioArtists = `in`.createTypedArrayList(AudioArtist.CREATOR) + internal constructor(parcel: Parcel) { + audios = parcel.createTypedArrayList(Audio.CREATOR) + stickers = parcel.createTypedArrayList(Sticker.CREATOR) + photos = parcel.createTypedArrayList(Photo.CREATOR) + docs = parcel.createTypedArrayList(Document.CREATOR) + videos = parcel.createTypedArrayList(Video.CREATOR) + posts = parcel.createTypedArrayList(Post.CREATOR) + links = parcel.createTypedArrayList(Link.CREATOR) + articles = parcel.createTypedArrayList(Article.CREATOR) + polls = parcel.createTypedArrayList(Poll.CREATOR) + pages = parcel.createTypedArrayList(WikiPage.CREATOR) + voiceMessages = parcel.createTypedArrayList(VoiceMessage.CREATOR) + gifts = parcel.createTypedArrayList(GiftItem.CREATOR) + stories = parcel.createTypedArrayList(Story.CREATOR) + calls = parcel.createTypedArrayList(Call.CREATOR) + geos = parcel.createTypedArrayList(Geo.CREATOR) + audioPlaylists = parcel.createTypedArrayList(AudioPlaylist.CREATOR) + graffity = parcel.createTypedArrayList(Graffiti.CREATOR) + photoAlbums = parcel.createTypedArrayList(PhotoAlbum.CREATOR) + notSupported = parcel.createTypedArrayList(NotSupported.CREATOR) + events = parcel.createTypedArrayList(Event.CREATOR) + markets = parcel.createTypedArrayList(Market.CREATOR) + marketAlbums = parcel.createTypedArrayList(MarketAlbum.CREATOR) + wallReplies = parcel.createTypedArrayList(WallReply.CREATOR) + audioArtists = parcel.createTypedArrayList(AudioArtist.CREATOR) } override fun writeToParcel(dest: Parcel, flags: Int) { diff --git a/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/model/Audio.kt b/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/model/Audio.kt index 7cae1c972..e7408e5ed 100644 --- a/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/model/Audio.kt +++ b/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/model/Audio.kt @@ -69,32 +69,32 @@ class Audio : AbsModel { var downloadIndicator = 0 constructor() - internal constructor(`in`: Parcel) { - id = `in`.readInt() - ownerId = `in`.readInt() - artist = `in`.readString() - title = `in`.readString() - duration = `in`.readInt() - url = `in`.readString() - lyricsId = `in`.readInt() - date = `in`.readLong() - albumId = `in`.readInt() - album_owner_id = `in`.readInt() - album_access_key = `in`.readString() - genre = `in`.readInt() - accessKey = `in`.readString() - isDeleted = `in`.getBoolean() - thumb_image_big = `in`.readString() - thumb_image_very_big = `in`.readString() - thumb_image_little = `in`.readString() - album_title = `in`.readString() - isAnimationNow = `in`.getBoolean() - isSelected = `in`.getBoolean() - isHq = `in`.getBoolean() - main_artists = readStringMap(`in`) - isLocal = `in`.getBoolean() - isLocalServer = `in`.getBoolean() - downloadIndicator = `in`.readInt() + internal constructor(parcel: Parcel) { + id = parcel.readInt() + ownerId = parcel.readInt() + artist = parcel.readString() + title = parcel.readString() + duration = parcel.readInt() + url = parcel.readString() + lyricsId = parcel.readInt() + date = parcel.readLong() + albumId = parcel.readInt() + album_owner_id = parcel.readInt() + album_access_key = parcel.readString() + genre = parcel.readInt() + accessKey = parcel.readString() + isDeleted = parcel.getBoolean() + thumb_image_big = parcel.readString() + thumb_image_very_big = parcel.readString() + thumb_image_little = parcel.readString() + album_title = parcel.readString() + isAnimationNow = parcel.getBoolean() + isSelected = parcel.getBoolean() + isHq = parcel.getBoolean() + main_artists = readStringMap(parcel) + isLocal = parcel.getBoolean() + isLocalServer = parcel.getBoolean() + downloadIndicator = parcel.readInt() } /* diff --git a/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/model/AudioArtist.kt b/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/model/AudioArtist.kt index 0a8e9aec9..ff6d18ac9 100644 --- a/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/model/AudioArtist.kt +++ b/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/model/AudioArtist.kt @@ -12,10 +12,10 @@ class AudioArtist : AbsModel { this.id = id } - internal constructor(`in`: Parcel) { - id = `in`.readString() - name = `in`.readString() - photo = `in`.createTypedArrayList(AudioArtistImage.CREATOR) + internal constructor(parcel: Parcel) { + id = parcel.readString() + name = parcel.readString() + photo = parcel.createTypedArrayList(AudioArtistImage.CREATOR) } @AbsModelType @@ -81,10 +81,10 @@ class AudioArtist : AbsModel { this.height = height } - internal constructor(`in`: Parcel) { - url = `in`.readString() - width = `in`.readInt() - height = `in`.readInt() + internal constructor(parcel: Parcel) { + url = parcel.readString() + width = parcel.readInt() + height = parcel.readInt() } override fun describeContents(): Int { diff --git a/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/model/AudioPlaylist.kt b/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/model/AudioPlaylist.kt index 832fce728..d33c67238 100644 --- a/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/model/AudioPlaylist.kt +++ b/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/model/AudioPlaylist.kt @@ -20,21 +20,21 @@ class AudioPlaylist : AbsModel { private var original_owner_id = 0 constructor() - internal constructor(`in`: Parcel) { - id = `in`.readInt() - owner_id = `in`.readInt() - count = `in`.readInt() - update_time = `in`.readLong() - Year = `in`.readInt() - artist_name = `in`.readString() - genre = `in`.readString() - title = `in`.readString() - description = `in`.readString() - thumb_image = `in`.readString() - access_key = `in`.readString() - original_access_key = `in`.readString() - original_id = `in`.readInt() - original_owner_id = `in`.readInt() + internal constructor(parcel: Parcel) { + id = parcel.readInt() + owner_id = parcel.readInt() + count = parcel.readInt() + update_time = parcel.readLong() + Year = parcel.readInt() + artist_name = parcel.readString() + genre = parcel.readString() + title = parcel.readString() + description = parcel.readString() + thumb_image = parcel.readString() + access_key = parcel.readString() + original_access_key = parcel.readString() + original_id = parcel.readInt() + original_owner_id = parcel.readInt() } override fun writeToParcel(parcel: Parcel, flags: Int) { diff --git a/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/model/Banned.kt b/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/model/Banned.kt index 71728db40..fc40d280a 100644 --- a/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/model/Banned.kt +++ b/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/model/Banned.kt @@ -18,11 +18,11 @@ class Banned : Parcelable { this.info = info } - internal constructor(`in`: Parcel) { - val wrapper = `in`.readTypedObjectCompat(ParcelableOwnerWrapper.CREATOR) + internal constructor(parcel: Parcel) { + val wrapper = parcel.readTypedObjectCompat(ParcelableOwnerWrapper.CREATOR) banned = wrapper?.get()!! - admin = `in`.readTypedObjectCompat(User.CREATOR)!! - info = `in`.readTypedObjectCompat(Info.CREATOR)!! + admin = parcel.readTypedObjectCompat(User.CREATOR)!! + info = parcel.readTypedObjectCompat(Info.CREATOR)!! } override fun describeContents(): Int { @@ -47,12 +47,12 @@ class Banned : Parcelable { var isCommentVisible = false private set - internal constructor(`in`: Parcel) { - date = `in`.readLong() - reason = `in`.readInt() - comment = `in`.readString() - endDate = `in`.readLong() - isCommentVisible = `in`.getBoolean() + internal constructor(parcel: Parcel) { + date = parcel.readLong() + reason = parcel.readInt() + comment = parcel.readString() + endDate = parcel.readLong() + isCommentVisible = parcel.getBoolean() } constructor() diff --git a/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/model/Call.kt b/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/model/Call.kt index 9ae393c40..c1e890c26 100644 --- a/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/model/Call.kt +++ b/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/model/Call.kt @@ -16,11 +16,11 @@ class Call : AbsModel { private set constructor() - internal constructor(`in`: Parcel) { - initiator_id = `in`.readInt() - receiver_id = `in`.readInt() - time = `in`.readLong() - state = `in`.readString() + internal constructor(parcel: Parcel) { + initiator_id = parcel.readInt() + receiver_id = parcel.readInt() + time = parcel.readLong() + state = parcel.readString() } override fun writeToParcel(parcel: Parcel, flags: Int) { diff --git a/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/model/Chat.kt b/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/model/Chat.kt index 0c4fed593..f8962e110 100644 --- a/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/model/Chat.kt +++ b/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/model/Chat.kt @@ -19,12 +19,12 @@ class Chat : AbsModel { this.id = id } - internal constructor(`in`: Parcel) { - id = `in`.readInt() - title = `in`.readString() - photo50 = `in`.readString() - photo100 = `in`.readString() - photo200 = `in`.readString() + internal constructor(parcel: Parcel) { + id = parcel.readInt() + title = parcel.readString() + photo50 = parcel.readString() + photo100 = parcel.readString() + photo200 = parcel.readString() } @AbsModelType diff --git a/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/model/ChatConfig.kt b/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/model/ChatConfig.kt index 5b57fc2db..63a715a4a 100644 --- a/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/model/ChatConfig.kt +++ b/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/model/ChatConfig.kt @@ -19,12 +19,12 @@ class ChatConfig : Parcelable { models = ModelsBundle() } - internal constructor(`in`: Parcel) { - closeOnSend = `in`.getBoolean() - models = `in`.readTypedObjectCompat(ModelsBundle.CREATOR)!! - initialText = `in`.readString() - uploadFiles = `in`.createTypedArrayList(Uri.CREATOR) - uploadFilesMimeType = `in`.readString() + internal constructor(parcel: Parcel) { + closeOnSend = parcel.getBoolean() + models = parcel.readTypedObjectCompat(ModelsBundle.CREATOR)!! + initialText = parcel.readString() + uploadFiles = parcel.createTypedArrayList(Uri.CREATOR) + uploadFilesMimeType = parcel.readString() } fun getModels(): ModelsBundle { diff --git a/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/model/City.kt b/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/model/City.kt index d8df79a87..429707821 100644 --- a/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/model/City.kt +++ b/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/model/City.kt @@ -20,12 +20,12 @@ class City : Parcelable { this.title = title } - internal constructor(`in`: Parcel) { - id = `in`.readInt() - title = `in`.readString() - isImportant = `in`.getBoolean() - area = `in`.readString() - region = `in`.readString() + internal constructor(parcel: Parcel) { + id = parcel.readInt() + title = parcel.readString() + isImportant = parcel.getBoolean() + area = parcel.readString() + region = parcel.readString() } fun setImportant(important: Boolean): City { diff --git a/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/model/Comment.kt b/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/model/Comment.kt index dfade5a07..63a28d26b 100644 --- a/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/model/Comment.kt +++ b/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/model/Comment.kt @@ -90,25 +90,25 @@ class Comment : AbsModel, Identificable { this.commented = commented } - internal constructor(`in`: Parcel) { - id = `in`.readInt() - fromId = `in`.readInt() - date = `in`.readLong() - text = `in`.readString() - replyToUser = `in`.readInt() - replyToComment = `in`.readInt() - likesCount = `in`.readInt() - isUserLikes = `in`.getBoolean() - isCanLike = `in`.getBoolean() - isCanEdit = `in`.getBoolean() - attachments = `in`.readTypedObjectCompat(Attachments.CREATOR) - commented = `in`.readTypedObjectCompat(Commented.CREATOR)!! - author = readOwner(`in`) - dbid = `in`.readInt() - isDeleted = `in`.getBoolean() - threadsCount = `in`.readInt() - threads = `in`.createTypedArrayList(CREATOR) - pid = `in`.readInt() + internal constructor(parcel: Parcel) { + id = parcel.readInt() + fromId = parcel.readInt() + date = parcel.readLong() + text = parcel.readString() + replyToUser = parcel.readInt() + replyToComment = parcel.readInt() + likesCount = parcel.readInt() + isUserLikes = parcel.getBoolean() + isCanLike = parcel.getBoolean() + isCanEdit = parcel.getBoolean() + attachments = parcel.readTypedObjectCompat(Attachments.CREATOR) + commented = parcel.readTypedObjectCompat(Commented.CREATOR)!! + author = readOwner(parcel) + dbid = parcel.readInt() + isDeleted = parcel.getBoolean() + threadsCount = parcel.readInt() + threads = parcel.createTypedArrayList(CREATOR) + pid = parcel.readInt() } @AbsModelType diff --git a/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/model/Commented.kt b/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/model/Commented.kt index ace2c08fe..b176c1178 100644 --- a/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/model/Commented.kt +++ b/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/model/Commented.kt @@ -24,11 +24,11 @@ class Commented : Parcelable { this.accessKey = accessKey } - internal constructor(`in`: Parcel) { - sourceId = `in`.readInt() - sourceOwnerId = `in`.readInt() - sourceType = `in`.readInt() - accessKey = `in`.readString() + internal constructor(parcel: Parcel) { + sourceId = parcel.readInt() + sourceOwnerId = parcel.readInt() + sourceType = parcel.readInt() + accessKey = parcel.readString() } fun setAccessKey(accessKey: String?): Commented { diff --git a/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/model/Community.kt b/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/model/Community.kt index 5aae8af47..6fa0f8b92 100644 --- a/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/model/Community.kt +++ b/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/model/Community.kt @@ -54,42 +54,42 @@ class Community : Owner { this.id = id } - internal constructor(`in`: Parcel) : super(`in`) { - id = `in`.readInt() - fullName = `in`.readString() - screenName = `in`.readString() - closed = `in`.readInt() - isAdmin = `in`.getBoolean() - adminLevel = `in`.readInt() - isMember = `in`.getBoolean() - membersCount = `in`.readInt() - memberStatus = `in`.readInt() - communityType = `in`.readInt() - photo50 = `in`.readString() - photo100 = `in`.readString() - photo200 = `in`.readString() - verified = `in`.getBoolean() - isBlacklisted = `in`.getBoolean() - hasUnseenStories = `in`.getBoolean() + internal constructor(parcel: Parcel) : super(parcel) { + id = parcel.readInt() + fullName = parcel.readString() + screenName = parcel.readString() + closed = parcel.readInt() + isAdmin = parcel.getBoolean() + adminLevel = parcel.readInt() + isMember = parcel.getBoolean() + membersCount = parcel.readInt() + memberStatus = parcel.readInt() + communityType = parcel.readInt() + photo50 = parcel.readString() + photo100 = parcel.readString() + photo200 = parcel.readString() + verified = parcel.getBoolean() + isBlacklisted = parcel.getBoolean() + hasUnseenStories = parcel.getBoolean() } - internal constructor(`in`: ParcelNative) : super(`in`) { - id = `in`.readInt() - fullName = `in`.readString() - screenName = `in`.readString() - closed = `in`.readInt() - isAdmin = `in`.readBoolean() - adminLevel = `in`.readInt() - isMember = `in`.readBoolean() - membersCount = `in`.readInt() - memberStatus = `in`.readInt() - communityType = `in`.readInt() - photo50 = `in`.readString() - photo100 = `in`.readString() - photo200 = `in`.readString() - verified = `in`.readBoolean() - isBlacklisted = `in`.readBoolean() - hasUnseenStories = `in`.readBoolean() + internal constructor(parcel: ParcelNative) : super(parcel) { + id = parcel.readInt() + fullName = parcel.readString() + screenName = parcel.readString() + closed = parcel.readInt() + isAdmin = parcel.readBoolean() + adminLevel = parcel.readInt() + isMember = parcel.readBoolean() + membersCount = parcel.readInt() + memberStatus = parcel.readInt() + communityType = parcel.readInt() + photo50 = parcel.readString() + photo100 = parcel.readString() + photo200 = parcel.readString() + verified = parcel.readBoolean() + isBlacklisted = parcel.readBoolean() + hasUnseenStories = parcel.readBoolean() } override val ownerId: Int @@ -244,8 +244,8 @@ class Community : Owner { companion object { @JvmField val CREATOR: Parcelable.Creator = object : Parcelable.Creator { - override fun createFromParcel(`in`: Parcel): Community { - return Community(`in`) + override fun createFromParcel(parcel: Parcel): Community { + return Community(parcel) } override fun newArray(size: Int): Array { diff --git a/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/model/CommunityDetails.kt b/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/model/CommunityDetails.kt index 0fad6d78b..f72651c34 100644 --- a/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/model/CommunityDetails.kt +++ b/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/model/CommunityDetails.kt @@ -1,6 +1,13 @@ package dev.ragnarok.fenrir.model -class CommunityDetails { +import android.os.Parcel +import android.os.Parcelable +import dev.ragnarok.fenrir.getBoolean +import dev.ragnarok.fenrir.putBoolean +import dev.ragnarok.fenrir.readTypedObjectCompat +import dev.ragnarok.fenrir.writeTypedObjectCompat + +class CommunityDetails : Parcelable { private var allWallCount = 0 private var ownerWallCount = 0 private var postponedWallCount = 0 @@ -25,6 +32,33 @@ class CommunityDetails { private var description: String? = null private var menu: List? = null + constructor() + constructor(parcel: Parcel) { + allWallCount = parcel.readInt() + ownerWallCount = parcel.readInt() + postponedWallCount = parcel.readInt() + suggestedWallCount = parcel.readInt() + donutWallCount = parcel.readInt() + canMessage = parcel.getBoolean() + isFavorite = parcel.getBoolean() + isSubscribed = parcel.getBoolean() + topicsCount = parcel.readInt() + docsCount = parcel.readInt() + photosCount = parcel.readInt() + audiosCount = parcel.readInt() + videosCount = parcel.readInt() + articlesCount = parcel.readInt() + productsCount = parcel.readInt() + chatsCount = parcel.readInt() + productServicesCount = parcel.readInt() + narrativesCount = parcel.readInt() + status = parcel.readString() + statusAudio = parcel.readTypedObjectCompat(Audio.CREATOR) + cover = parcel.readTypedObjectCompat(Cover.CREATOR) + description = parcel.readString() + menu = parcel.createTypedArrayList(Menu.CREATOR) + } + fun setProductServicesCount(productServicesCount: Int): CommunityDetails { this.productServicesCount = productServicesCount return this @@ -232,9 +266,15 @@ class CommunityDetails { return this } - class Cover { + class Cover() : Parcelable { private var enabled = false private var images: ArrayList? = null + + constructor(parcel: Parcel) : this() { + enabled = parcel.getBoolean() + images = parcel.createTypedArrayList(CoverImage.CREATOR) + } + fun getImages(): ArrayList? { return images } @@ -252,9 +292,35 @@ class CommunityDetails { this.enabled = enabled return this } + + override fun writeToParcel(parcel: Parcel, flags: Int) { + parcel.putBoolean(enabled) + parcel.writeTypedList(images) + } + + override fun describeContents(): Int { + return 0 + } + + companion object CREATOR : Parcelable.Creator { + override fun createFromParcel(parcel: Parcel): Cover { + return Cover(parcel) + } + + override fun newArray(size: Int): Array { + return arrayOfNulls(size) + } + } } - class CoverImage(private val url: String?, private val height: Int, private val width: Int) { + class CoverImage(private val url: String?, private val height: Int, private val width: Int) : + Parcelable { + constructor(parcel: Parcel) : this( + parcel.readString(), + parcel.readInt(), + parcel.readInt() + ) + fun getHeight(): Int { return height } @@ -266,6 +332,26 @@ class CommunityDetails { fun getUrl(): String? { return url } + + override fun writeToParcel(parcel: Parcel, flags: Int) { + parcel.writeString(url) + parcel.writeInt(height) + parcel.writeInt(width) + } + + override fun describeContents(): Int { + return 0 + } + + companion object CREATOR : Parcelable.Creator { + override fun createFromParcel(parcel: Parcel): CoverImage { + return CoverImage(parcel) + } + + override fun newArray(size: Int): Array { + return arrayOfNulls(size) + } + } } class Menu( @@ -274,5 +360,75 @@ class CommunityDetails { val title: String?, val type: String?, val cover: String? - ) + ) : Parcelable { + constructor(parcel: Parcel) : this( + parcel.readInt(), + parcel.readString(), + parcel.readString(), + parcel.readString(), + parcel.readString() + ) + + override fun writeToParcel(parcel: Parcel, flags: Int) { + parcel.writeInt(id) + parcel.writeString(url) + parcel.writeString(title) + parcel.writeString(type) + parcel.writeString(cover) + } + + override fun describeContents(): Int { + return 0 + } + + companion object CREATOR : Parcelable.Creator { + override fun createFromParcel(parcel: Parcel): Menu { + return Menu(parcel) + } + + override fun newArray(size: Int): Array { + return arrayOfNulls(size) + } + } + } + + override fun writeToParcel(parcel: Parcel, flags: Int) { + parcel.writeInt(allWallCount) + parcel.writeInt(ownerWallCount) + parcel.writeInt(postponedWallCount) + parcel.writeInt(suggestedWallCount) + parcel.writeInt(donutWallCount) + parcel.putBoolean(canMessage) + parcel.putBoolean(isFavorite) + parcel.putBoolean(isSubscribed) + parcel.writeInt(topicsCount) + parcel.writeInt(docsCount) + parcel.writeInt(photosCount) + parcel.writeInt(audiosCount) + parcel.writeInt(videosCount) + parcel.writeInt(articlesCount) + parcel.writeInt(productsCount) + parcel.writeInt(chatsCount) + parcel.writeInt(productServicesCount) + parcel.writeInt(narrativesCount) + parcel.writeString(status) + parcel.writeTypedObjectCompat(statusAudio, flags) + parcel.writeTypedObjectCompat(cover, flags) + parcel.writeString(description) + parcel.writeTypedList(menu) + } + + override fun describeContents(): Int { + return 0 + } + + companion object CREATOR : Parcelable.Creator { + override fun createFromParcel(parcel: Parcel): CommunityDetails { + return CommunityDetails(parcel) + } + + override fun newArray(size: Int): Array { + return arrayOfNulls(size) + } + } } \ No newline at end of file diff --git a/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/model/ContactConversation.kt b/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/model/ContactConversation.kt index 375314e10..af6d75612 100644 --- a/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/model/ContactConversation.kt +++ b/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/model/ContactConversation.kt @@ -28,14 +28,14 @@ class ContactConversation : Parcelable { this.id = id } - internal constructor(`in`: Parcel) { - id = `in`.readInt() - title = `in`.readString() - isContact = `in`.getBoolean() - photo = `in`.readString() - phone = `in`.readString() - lastSeen = `in`.readLong() - last_seen_status = `in`.readString() + internal constructor(parcel: Parcel) { + id = parcel.readInt() + title = parcel.readString() + isContact = parcel.getBoolean() + photo = parcel.readString() + phone = parcel.readString() + lastSeen = parcel.readLong() + last_seen_status = parcel.readString() } fun setIsContact(value: Boolean): ContactConversation { diff --git a/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/model/DeltaOwner.kt b/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/model/DeltaOwner.kt index 277efd137..c3002403c 100644 --- a/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/model/DeltaOwner.kt +++ b/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/model/DeltaOwner.kt @@ -36,10 +36,10 @@ class DeltaOwner : Parcelable { return this } - internal constructor(`in`: Parcel) { - time = `in`.readLong() - ownerId = `in`.readInt() - content = `in`.createTypedArrayList(DeltaOwnerList.CREATOR) ?: ArrayList() + internal constructor(parcel: Parcel) { + time = parcel.readLong() + ownerId = parcel.readInt() + content = parcel.createTypedArrayList(DeltaOwnerList.CREATOR) ?: ArrayList() } override fun writeToParcel(parcel: Parcel, i: Int) { @@ -71,9 +71,9 @@ class DeltaOwner : Parcelable { @Suppress("unused") constructor() - internal constructor(`in`: Parcel) { - name = `in`.readString() - ownerList = ParcelableOwnerWrapper.readOwners(`in`) ?: ArrayList() + internal constructor(parcel: Parcel) { + name = parcel.readString() + ownerList = ParcelableOwnerWrapper.readOwners(parcel) ?: ArrayList() } override fun writeToParcel(parcel: Parcel, i: Int) { diff --git a/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/model/Dialog.kt b/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/model/Dialog.kt index 56daa34e0..37d6d55ff 100644 --- a/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/model/Dialog.kt +++ b/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/model/Dialog.kt @@ -37,24 +37,24 @@ class Dialog : Identificable, Parcelable { private var minor_id = 0 constructor() - internal constructor(`in`: Parcel) { - peerId = `in`.readInt() - title = `in`.readString() - unreadCount = `in`.readInt() - photo50 = `in`.readString() - photo100 = `in`.readString() - photo200 = `in`.readString() - message = `in`.readTypedObjectCompat(Message.CREATOR) - val interlocutorIsNull = `in`.getBoolean() + internal constructor(parcel: Parcel) { + peerId = parcel.readInt() + title = parcel.readString() + unreadCount = parcel.readInt() + photo50 = parcel.readString() + photo100 = parcel.readString() + photo200 = parcel.readString() + message = parcel.readTypedObjectCompat(Message.CREATOR) + val interlocutorIsNull = parcel.getBoolean() if (!interlocutorIsNull) { - interlocutor = Owner.readOwnerFromParcel(`in`) + interlocutor = Owner.readOwnerFromParcel(parcel) } - lastMessageId = `in`.readInt() - inRead = `in`.readInt() - outRead = `in`.readInt() - major_id = `in`.readInt() - minor_id = `in`.readInt() - isGroupChannel = `in`.getBoolean() + lastMessageId = parcel.readInt() + inRead = parcel.readInt() + outRead = parcel.readInt() + major_id = parcel.readInt() + minor_id = parcel.readInt() + isGroupChannel = parcel.getBoolean() } fun setPeerId(peerId: Int): Dialog { diff --git a/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/model/Document.kt b/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/model/Document.kt index d225feefa..bd6625f4b 100644 --- a/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/model/Document.kt +++ b/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/model/Document.kt @@ -41,21 +41,21 @@ class Document : AbsModel { this.ownerId = ownerId } - internal constructor(`in`: Parcel) { - id = `in`.readInt() - ownerId = `in`.readInt() - title = `in`.readString() - size = `in`.readLong() - ext = `in`.readString() - url = `in`.readString() - date = `in`.readLong() - type = `in`.readInt() - accessKey = `in`.readString() - photoPreview = `in`.readTypedObjectCompat(PhotoSizes.CREATOR) - videoPreview = `in`.readTypedObjectCompat(VideoPreview.CREATOR) - graffiti = `in`.readTypedObjectCompat(Graffiti.CREATOR) - msgId = `in`.readInt() - msgPeerId = `in`.readInt() + internal constructor(parcel: Parcel) { + id = parcel.readInt() + ownerId = parcel.readInt() + title = parcel.readString() + size = parcel.readLong() + ext = parcel.readString() + url = parcel.readString() + date = parcel.readLong() + type = parcel.readInt() + accessKey = parcel.readString() + photoPreview = parcel.readTypedObjectCompat(PhotoSizes.CREATOR) + videoPreview = parcel.readTypedObjectCompat(VideoPreview.CREATOR) + graffiti = parcel.readTypedObjectCompat(Graffiti.CREATOR) + msgId = parcel.readInt() + msgPeerId = parcel.readInt() } override fun writeToParcel(parcel: Parcel, flags: Int) { @@ -175,10 +175,10 @@ class Document : AbsModel { private set constructor() - internal constructor(`in`: Parcel) { - src = `in`.readString() - width = `in`.readInt() - height = `in`.readInt() + internal constructor(parcel: Parcel) { + src = parcel.readString() + width = parcel.readInt() + height = parcel.readInt() } override fun writeToParcel(parcel: Parcel, flags: Int) { @@ -233,11 +233,11 @@ class Document : AbsModel { private set constructor() - internal constructor(`in`: Parcel) { - src = `in`.readString() - width = `in`.readInt() - height = `in`.readInt() - fileSize = `in`.readLong() + internal constructor(parcel: Parcel) { + src = parcel.readString() + width = parcel.readInt() + height = parcel.readInt() + fileSize = parcel.readLong() } override fun writeToParcel(parcel: Parcel, flags: Int) { diff --git a/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/model/DrawerCategory.kt b/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/model/DrawerCategory.kt index 3c832144b..3855756b3 100644 --- a/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/model/DrawerCategory.kt +++ b/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/model/DrawerCategory.kt @@ -21,9 +21,9 @@ class DrawerCategory : Parcelable { this.active = active } - internal constructor(`in`: Parcel) { - id = `in`.readString()!! - active = `in`.getBoolean() + internal constructor(parcel: Parcel) { + id = parcel.readString()!! + active = parcel.getBoolean() } @StringRes diff --git a/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/model/Event.kt b/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/model/Event.kt index 0cf4529b6..871d9cb98 100644 --- a/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/model/Event.kt +++ b/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/model/Event.kt @@ -17,13 +17,13 @@ class Event : AbsModel { this.id = id } - internal constructor(`in`: Parcel) { + internal constructor(parcel: Parcel) { Owner - id = `in`.readInt() - button_text = `in`.readString() - text = `in`.readString() + id = parcel.readInt() + button_text = parcel.readString() + text = parcel.readString() subject = - Owner.readOwnerFromParcel(id, `in`) + Owner.readOwnerFromParcel(id, parcel) } @AbsModelType diff --git a/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/model/FaveLink.kt b/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/model/FaveLink.kt index 6ff5f1086..5e851bc73 100644 --- a/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/model/FaveLink.kt +++ b/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/model/FaveLink.kt @@ -20,12 +20,12 @@ class FaveLink : AbsModel { this.id = id } - internal constructor(`in`: Parcel) { - id = `in`.readString() - url = `in`.readString() - title = `in`.readString() - description = `in`.readString() - photo = `in`.readTypedObjectCompat(Photo.CREATOR) + internal constructor(parcel: Parcel) { + id = parcel.readString() + url = parcel.readString() + title = parcel.readString() + description = parcel.readString() + photo = parcel.readTypedObjectCompat(Photo.CREATOR) } @AbsModelType diff --git a/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/model/FeedSource.kt b/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/model/FeedSource.kt index ba97ee9d9..1e29ce443 100644 --- a/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/model/FeedSource.kt +++ b/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/model/FeedSource.kt @@ -28,11 +28,11 @@ class FeedSource : Entry, Parcelable { this.custom = custom } - internal constructor(`in`: Parcel) { - value = `in`.readString() - title = `in`.readTypedObjectCompat(Text.CREATOR) - active = `in`.getBoolean() - custom = `in`.getBoolean() + internal constructor(parcel: Parcel) { + value = parcel.readString() + title = parcel.readTypedObjectCompat(Text.CREATOR) + active = parcel.getBoolean() + custom = parcel.getBoolean() } fun getValue(): String? { diff --git a/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/model/FileItem.kt b/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/model/FileItem.kt index 518712bbb..28675a8ce 100644 --- a/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/model/FileItem.kt +++ b/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/model/FileItem.kt @@ -32,14 +32,14 @@ class FileItem : Parcelable { this.modification = modification } - internal constructor(`in`: Parcel) { - isDir = `in`.getBoolean() - file_name = `in`.readString()!! - file_path = `in`.readString()!! - parent_name = `in`.readString() - parent_path = `in`.readString() - modification = `in`.readLong() - size = `in`.readLong() + internal constructor(parcel: Parcel) { + isDir = parcel.getBoolean() + file_name = parcel.readString()!! + file_path = parcel.readString()!! + parent_name = parcel.readString() + parent_path = parcel.readString() + modification = parcel.readLong() + size = parcel.readLong() } override fun toString(): String { diff --git a/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/model/FileRemote.kt b/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/model/FileRemote.kt index 7d03fe56d..c9598c875 100644 --- a/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/model/FileRemote.kt +++ b/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/model/FileRemote.kt @@ -51,28 +51,28 @@ class FileRemote : Parcelable, ParcelNative.ParcelableNative { @Suppress("UNUSED") constructor() - internal constructor(`in`: Parcel) { - id = `in`.readInt() - owner_Id = `in`.readInt() - file_name = `in`.readString() - type = `in`.readInt() - modification_time = `in`.readLong() - size = `in`.readLong() - url = `in`.readString() - preview_url = `in`.readString() - isSelected = `in`.getBoolean() + internal constructor(parcel: Parcel) { + id = parcel.readInt() + owner_Id = parcel.readInt() + file_name = parcel.readString() + type = parcel.readInt() + modification_time = parcel.readLong() + size = parcel.readLong() + url = parcel.readString() + preview_url = parcel.readString() + isSelected = parcel.getBoolean() } - internal constructor(`in`: ParcelNative) { - id = `in`.readInt() - owner_Id = `in`.readInt() - file_name = `in`.readString() - type = `in`.readInt() - modification_time = `in`.readLong() - size = `in`.readLong() - url = `in`.readString() - preview_url = `in`.readString() - isSelected = `in`.readBoolean() + internal constructor(parcel: ParcelNative) { + id = parcel.readInt() + owner_Id = parcel.readInt() + file_name = parcel.readString() + type = parcel.readInt() + modification_time = parcel.readLong() + size = parcel.readLong() + url = parcel.readString() + preview_url = parcel.readString() + isSelected = parcel.readBoolean() } override fun writeToParcel(dest: Parcel, flags: Int) { @@ -151,8 +151,8 @@ class FileRemote : Parcelable, ParcelNative.ParcelableNative { companion object { @JvmField val CREATOR: Parcelable.Creator = object : Parcelable.Creator { - override fun createFromParcel(`in`: Parcel): FileRemote { - return FileRemote(`in`) + override fun createFromParcel(parcel: Parcel): FileRemote { + return FileRemote(parcel) } override fun newArray(size: Int): Array { diff --git a/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/model/FriendList.kt b/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/model/FriendList.kt index 65b484d08..17f7bec27 100644 --- a/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/model/FriendList.kt +++ b/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/model/FriendList.kt @@ -12,9 +12,9 @@ class FriendList : Parcelable { this.name = name } - internal constructor(`in`: Parcel) { - id = `in`.readInt() - name = `in`.readString() + internal constructor(parcel: Parcel) { + id = parcel.readInt() + name = parcel.readString() } fun getId(): Int { diff --git a/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/model/FriendsCounters.kt b/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/model/FriendsCounters.kt index badbd1b0d..d4b2d5eac 100644 --- a/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/model/FriendsCounters.kt +++ b/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/model/FriendsCounters.kt @@ -16,11 +16,11 @@ class FriendsCounters : Parcelable { this.mutual = mutual } - internal constructor(`in`: Parcel) { - all = `in`.readInt() - online = `in`.readInt() - followers = `in`.readInt() - mutual = `in`.readInt() + internal constructor(parcel: Parcel) { + all = parcel.readInt() + online = parcel.readInt() + followers = parcel.readInt() + mutual = parcel.readInt() } fun getAll(): Int { diff --git a/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/model/FwdMessages.kt b/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/model/FwdMessages.kt index 14aa98d3e..35816fe0c 100644 --- a/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/model/FwdMessages.kt +++ b/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/model/FwdMessages.kt @@ -10,8 +10,8 @@ class FwdMessages : AbsModel { this.fwds = fwds } - internal constructor(`in`: Parcel) { - fwds = `in`.createTypedArrayList(Message.CREATOR)!! + internal constructor(parcel: Parcel) { + fwds = parcel.createTypedArrayList(Message.CREATOR)!! } @AbsModelType diff --git a/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/model/Geo.kt b/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/model/Geo.kt index 8e2c3e2b5..f666178be 100644 --- a/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/model/Geo.kt +++ b/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/model/Geo.kt @@ -18,13 +18,13 @@ class Geo : AbsModel { private set constructor() - internal constructor(`in`: Parcel) { - latitude = `in`.readString() - longitude = `in`.readString() - title = `in`.readString() - address = `in`.readString() - country = `in`.readInt() - id = `in`.readInt() + internal constructor(parcel: Parcel) { + latitude = parcel.readString() + longitude = parcel.readString() + title = parcel.readString() + address = parcel.readString() + country = parcel.readInt() + id = parcel.readInt() } override fun writeToParcel(parcel: Parcel, flags: Int) { diff --git a/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/model/Gift.kt b/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/model/Gift.kt index 95269afa5..6cab31920 100644 --- a/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/model/Gift.kt +++ b/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/model/Gift.kt @@ -19,13 +19,13 @@ class Gift : AbsModel { var privacy = 0 private set - internal constructor(`in`: Parcel) { - id = `in`.readInt() - fromId = `in`.readInt() - message = `in`.readString() - date = `in`.readLong() - giftItem = `in`.readTypedObjectCompat(GiftItem.CREATOR) - privacy = `in`.readInt() + internal constructor(parcel: Parcel) { + id = parcel.readInt() + fromId = parcel.readInt() + message = parcel.readString() + date = parcel.readLong() + giftItem = parcel.readTypedObjectCompat(GiftItem.CREATOR) + privacy = parcel.readInt() } @AbsModelType diff --git a/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/model/GiftItem.kt b/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/model/GiftItem.kt index 1fa941c30..84fafdfea 100644 --- a/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/model/GiftItem.kt +++ b/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/model/GiftItem.kt @@ -13,11 +13,11 @@ class GiftItem : AbsModel { var thumb48: String? = null private set - internal constructor(`in`: Parcel) { - id = `in`.readInt() - thumb256 = `in`.readString() - thumb96 = `in`.readString() - thumb48 = `in`.readString() + internal constructor(parcel: Parcel) { + id = parcel.readInt() + thumb256 = parcel.readString() + thumb96 = parcel.readString() + thumb48 = parcel.readString() } @AbsModelType diff --git a/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/model/Graffiti.kt b/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/model/Graffiti.kt index 4ebe90c10..111390026 100644 --- a/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/model/Graffiti.kt +++ b/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/model/Graffiti.kt @@ -18,13 +18,13 @@ class Graffiti : AbsModel { private set constructor() - internal constructor(`in`: Parcel) { - id = `in`.readInt() - owner_id = `in`.readInt() - url = `in`.readString() - width = `in`.readInt() - height = `in`.readInt() - access_key = `in`.readString() + internal constructor(parcel: Parcel) { + id = parcel.readInt() + owner_id = parcel.readInt() + url = parcel.readString() + width = parcel.readInt() + height = parcel.readInt() + access_key = parcel.readString() } override fun writeToParcel(parcel: Parcel, flags: Int) { diff --git a/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/model/GroupSettings.kt b/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/model/GroupSettings.kt index 4a31d2ee0..3fe399ab9 100644 --- a/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/model/GroupSettings.kt +++ b/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/model/GroupSettings.kt @@ -27,20 +27,20 @@ class GroupSettings : Parcelable { availableCategories = emptyList() } - internal constructor(`in`: Parcel) { - title = `in`.readString() - description = `in`.readString() - address = `in`.readString() - category = `in`.readTypedObjectCompat(IdOption.CREATOR) - subcategory = `in`.readTypedObjectCompat(IdOption.CREATOR) - availableCategories = `in`.createTypedArrayList(IdOption.CREATOR) - website = `in`.readString() - feedbackCommentsEnabled = `in`.getBoolean() - obsceneFilterEnabled = `in`.getBoolean() - obsceneStopwordsEnabled = `in`.getBoolean() - obsceneWords = `in`.readString() - access = `in`.readInt() - age = `in`.readInt() + internal constructor(parcel: Parcel) { + title = parcel.readString() + description = parcel.readString() + address = parcel.readString() + category = parcel.readTypedObjectCompat(IdOption.CREATOR) + subcategory = parcel.readTypedObjectCompat(IdOption.CREATOR) + availableCategories = parcel.createTypedArrayList(IdOption.CREATOR) + website = parcel.readString() + feedbackCommentsEnabled = parcel.getBoolean() + obsceneFilterEnabled = parcel.getBoolean() + obsceneStopwordsEnabled = parcel.getBoolean() + obsceneWords = parcel.readString() + access = parcel.readInt() + age = parcel.readInt() } override fun writeToParcel(dest: Parcel, flags: Int) { diff --git a/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/model/Icon.kt b/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/model/Icon.kt index 13f36e7e0..49b178d4e 100644 --- a/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/model/Icon.kt +++ b/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/model/Icon.kt @@ -16,9 +16,9 @@ class Icon : Parcelable { this.url = url } - internal constructor(`in`: Parcel) { - res = readObjectInteger(`in`) - url = `in`.readString() + internal constructor(parcel: Parcel) { + res = readObjectInteger(parcel) + url = parcel.readString() } val isRemote: Boolean @@ -36,8 +36,8 @@ class Icon : Parcelable { companion object { @JvmField val CREATOR: Parcelable.Creator = object : Parcelable.Creator { - override fun createFromParcel(`in`: Parcel): Icon { - return Icon(`in`) + override fun createFromParcel(parcel: Parcel): Icon { + return Icon(parcel) } override fun newArray(size: Int): Array { diff --git a/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/model/IdOption.kt b/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/model/IdOption.kt index 8422753e6..1b6f9d662 100644 --- a/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/model/IdOption.kt +++ b/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/model/IdOption.kt @@ -16,10 +16,10 @@ class IdOption : Parcelable, Identificable { this.childs = childs } - internal constructor(`in`: Parcel) { - id = `in`.readInt() - title = `in`.readString() - childs = `in`.createTypedArrayList(CREATOR) + internal constructor(parcel: Parcel) { + id = parcel.readInt() + title = parcel.readString() + childs = parcel.createTypedArrayList(CREATOR) } override fun writeToParcel(dest: Parcel, flags: Int) { diff --git a/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/model/IdPair.kt b/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/model/IdPair.kt index 92daa2237..dc89e34e6 100644 --- a/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/model/IdPair.kt +++ b/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/model/IdPair.kt @@ -12,9 +12,9 @@ class IdPair : Parcelable { this.ownerId = ownerId } - internal constructor(`in`: Parcel) { - id = `in`.readInt() - ownerId = `in`.readInt() + internal constructor(parcel: Parcel) { + id = parcel.readInt() + ownerId = parcel.readInt() } override fun describeContents(): Int { diff --git a/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/model/Keyboard.kt b/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/model/Keyboard.kt index ef3130ef5..936237cad 100644 --- a/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/model/Keyboard.kt +++ b/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/model/Keyboard.kt @@ -17,14 +17,14 @@ class Keyboard : Parcelable { private set constructor() - internal constructor(`in`: Parcel) { - one_time = `in`.getBoolean() - inline = `in`.getBoolean() - author_id = `in`.readInt() - val size = `in`.readInt() + internal constructor(parcel: Parcel) { + one_time = parcel.getBoolean() + inline = parcel.getBoolean() + author_id = parcel.readInt() + val size = parcel.readInt() buttons = ArrayList(size) for (i in 0 until size) { - `in`.createTypedArrayList(Button.CREATOR)?.let { buttons?.add(i, it) } + parcel.createTypedArrayList(Button.CREATOR)?.let { buttons?.add(i, it) } } } @@ -79,12 +79,12 @@ class Keyboard : Parcelable { private set constructor() - internal constructor(`in`: Parcel) { - color = `in`.readString() - type = `in`.readString() - label = `in`.readString() - link = `in`.readString() - payload = `in`.readString() + internal constructor(parcel: Parcel) { + color = parcel.readString() + type = parcel.readString() + label = parcel.readString() + link = parcel.readString() + payload = parcel.readString() } fun setColor(color: String?): Button { diff --git a/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/model/LastReadId.kt b/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/model/LastReadId.kt index 97afbceea..90deba7b0 100644 --- a/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/model/LastReadId.kt +++ b/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/model/LastReadId.kt @@ -14,8 +14,8 @@ class LastReadId(private var outgoing: Int, private var incoming: Int) { return incoming } - fun setIncoming(`in`: Int): LastReadId { - incoming = `in` + fun setIncoming(parcel: Int): LastReadId { + incoming = parcel return this } } \ No newline at end of file diff --git a/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/model/Link.kt b/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/model/Link.kt index 5c5d42547..1b14b5920 100644 --- a/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/model/Link.kt +++ b/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/model/Link.kt @@ -24,15 +24,15 @@ class Link : AbsModel { private set constructor() - internal constructor(`in`: Parcel) { - url = `in`.readString() - title = `in`.readString() - caption = `in`.readString() - description = `in`.readString() - previewPhoto = `in`.readString() - photo = `in`.readTypedObjectCompat(Photo.CREATOR) - msgId = `in`.readInt() - msgPeerId = `in`.readInt() + internal constructor(parcel: Parcel) { + url = parcel.readString() + title = parcel.readString() + caption = parcel.readString() + description = parcel.readString() + previewPhoto = parcel.readString() + photo = parcel.readTypedObjectCompat(Photo.CREATOR) + msgId = parcel.readInt() + msgPeerId = parcel.readInt() } override fun writeToParcel(parcel: Parcel, flags: Int) { diff --git a/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/model/LocalImageAlbum.kt b/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/model/LocalImageAlbum.kt index 30b43e902..85f78b6a8 100644 --- a/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/model/LocalImageAlbum.kt +++ b/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/model/LocalImageAlbum.kt @@ -10,11 +10,11 @@ class LocalImageAlbum : Parcelable { private var photoCount = 0 constructor() - internal constructor(`in`: Parcel) { - id = `in`.readInt() - name = `in`.readString() - coverImageId = `in`.readLong() - photoCount = `in`.readInt() + internal constructor(parcel: Parcel) { + id = parcel.readInt() + name = parcel.readString() + coverImageId = parcel.readLong() + photoCount = parcel.readInt() } fun getId(): Int { diff --git a/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/model/LocalPhoto.kt b/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/model/LocalPhoto.kt index 86052c950..03a8e441d 100644 --- a/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/model/LocalPhoto.kt +++ b/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/model/LocalPhoto.kt @@ -13,11 +13,11 @@ class LocalPhoto : Parcelable, Comparable, ISelectable { private var index = 0 constructor() - internal constructor(`in`: Parcel) { - imageId = `in`.readLong() - fullImageUri = Uri.parse(`in`.readString()) - selected = `in`.getBoolean() - index = `in`.readInt() + internal constructor(parcel: Parcel) { + imageId = parcel.readLong() + fullImageUri = Uri.parse(parcel.readString()) + selected = parcel.getBoolean() + index = parcel.readInt() } override fun describeContents(): Int { diff --git a/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/model/LocalVideo.kt b/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/model/LocalVideo.kt index 86e1d29a2..684242bc9 100644 --- a/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/model/LocalVideo.kt +++ b/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/model/LocalVideo.kt @@ -20,14 +20,14 @@ class LocalVideo : Parcelable, Comparable, ISelectable { this.data = data } - internal constructor(`in`: Parcel) { - id = `in`.readLong() - data = Uri.parse(`in`.readString()) - selected = `in`.getBoolean() - index = `in`.readInt() - size = `in`.readLong() - duration = `in`.readInt() - title = `in`.readString() + internal constructor(parcel: Parcel) { + id = parcel.readLong() + data = Uri.parse(parcel.readString()) + selected = parcel.getBoolean() + index = parcel.readInt() + size = parcel.readLong() + duration = parcel.readInt() + title = parcel.readString() } override fun describeContents(): Int { diff --git a/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/model/Manager.kt b/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/model/Manager.kt index 0ae25c5b7..5dfbcc286 100644 --- a/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/model/Manager.kt +++ b/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/model/Manager.kt @@ -20,10 +20,10 @@ class Manager : Parcelable { this.role = role } - internal constructor(`in`: Parcel) { - user = `in`.readTypedObjectCompat(User.CREATOR) - isDisplayAsContact = `in`.getBoolean() - role = `in`.readString() + internal constructor(parcel: Parcel) { + user = parcel.readTypedObjectCompat(User.CREATOR) + isDisplayAsContact = parcel.getBoolean() + role = parcel.readString() } fun setContactInfo(contactInfo: ContactInfo?): Manager { diff --git a/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/model/Market.kt b/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/model/Market.kt index 93c65d486..1e1cd11c9 100644 --- a/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/model/Market.kt +++ b/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/model/Market.kt @@ -38,21 +38,21 @@ class Market : AbsModel { this.owner_id = owner_id } - internal constructor(`in`: Parcel) { - id = `in`.readInt() - owner_id = `in`.readInt() - access_key = `in`.readString() - isIs_favorite = `in`.getBoolean() - weight = `in`.readInt() - availability = `in`.readInt() - date = `in`.readLong() - title = `in`.readString() - description = `in`.readString() - price = `in`.readString() - dimensions = `in`.readString() - thumb_photo = `in`.readString() - sku = `in`.readString() - photos = `in`.createTypedArrayList(Photo.CREATOR) + internal constructor(parcel: Parcel) { + id = parcel.readInt() + owner_id = parcel.readInt() + access_key = parcel.readString() + isIs_favorite = parcel.getBoolean() + weight = parcel.readInt() + availability = parcel.readInt() + date = parcel.readLong() + title = parcel.readString() + description = parcel.readString() + price = parcel.readString() + dimensions = parcel.readString() + thumb_photo = parcel.readString() + sku = parcel.readString() + photos = parcel.createTypedArrayList(Photo.CREATOR) } override fun writeToParcel(parcel: Parcel, flags: Int) { diff --git a/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/model/MarketAlbum.kt b/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/model/MarketAlbum.kt index 78ba5178a..1d0575354 100644 --- a/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/model/MarketAlbum.kt +++ b/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/model/MarketAlbum.kt @@ -19,14 +19,14 @@ class MarketAlbum : AbsModel { this.owner_id = owner_id } - internal constructor(`in`: Parcel) { - id = `in`.readInt() - owner_id = `in`.readInt() - access_key = `in`.readString() - count = `in`.readInt() - updated_time = `in`.readLong() - title = `in`.readString() - photo = `in`.readTypedObjectCompat(Photo.CREATOR) + internal constructor(parcel: Parcel) { + id = parcel.readInt() + owner_id = parcel.readInt() + access_key = parcel.readString() + count = parcel.readInt() + updated_time = parcel.readLong() + title = parcel.readString() + photo = parcel.readTypedObjectCompat(Photo.CREATOR) } override fun writeToParcel(parcel: Parcel, flags: Int) { diff --git a/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/model/Message.kt b/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/model/Message.kt index c3bfe4579..bd41301f4 100644 --- a/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/model/Message.kt +++ b/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/model/Message.kt @@ -92,46 +92,46 @@ class Message : AbsModel, Identificable, ISelectable { this.id = id } - internal constructor(`in`: Parcel) { - accountId = `in`.readInt() - id = `in`.readInt() - body = `in`.readString() - decryptedBody = `in`.readString() + internal constructor(parcel: Parcel) { + accountId = parcel.readInt() + id = parcel.readInt() + body = parcel.readString() + decryptedBody = parcel.readString() //this.title = in.readString(); - peerId = `in`.readInt() - senderId = `in`.readInt() - isOut = `in`.getBoolean() - isImportant = `in`.getBoolean() - @MessageStatus val tStatus = `in`.readInt() + peerId = parcel.readInt() + senderId = parcel.readInt() + isOut = parcel.getBoolean() + isImportant = parcel.getBoolean() + @MessageStatus val tStatus = parcel.readInt() status = tStatus - @CryptStatus val cs = `in`.readInt() + @CryptStatus val cs = parcel.readInt() cryptStatus = cs - date = `in`.readLong() - isSelected = `in`.getBoolean() - isDeleted = `in`.getBoolean() - isDeletedForAll = `in`.getBoolean() - attachments = `in`.readTypedObjectCompat(Attachments.CREATOR) - fwd = `in`.createTypedArrayList(CREATOR) - originalId = `in`.readInt() - @ChatAction val tmpChatAction = `in`.readInt() + date = parcel.readLong() + isSelected = parcel.getBoolean() + isDeleted = parcel.getBoolean() + isDeletedForAll = parcel.getBoolean() + attachments = parcel.readTypedObjectCompat(Attachments.CREATOR) + fwd = parcel.createTypedArrayList(CREATOR) + originalId = parcel.readInt() + @ChatAction val tmpChatAction = parcel.readInt() action = tmpChatAction - actionMid = `in`.readInt() - actionEmail = `in`.readString() - actionText = `in`.readString() - photo50 = `in`.readString() - photo100 = `in`.readString() - photo200 = `in`.readString() + actionMid = parcel.readInt() + actionEmail = parcel.readString() + actionText = parcel.readString() + photo50 = parcel.readString() + photo100 = parcel.readString() + photo200 = parcel.readString() actionUser = - `in`.readTypedObjectCompat(ParcelableOwnerWrapper.CREATOR)!! + parcel.readTypedObjectCompat(ParcelableOwnerWrapper.CREATOR)!! .get() - sender = Owner.readOwnerFromParcel(senderId, `in`) - randomId = `in`.readLong() - extras = readIntStringMap(`in`) - forwardMessagesCount = `in`.readInt() - isHasAttachments = `in`.getBoolean() - updateTime = `in`.readLong() - payload = `in`.readString() - keyboard = `in`.readTypedObjectCompat(Keyboard.CREATOR) + sender = Owner.readOwnerFromParcel(senderId, parcel) + randomId = parcel.readLong() + extras = readIntStringMap(parcel) + forwardMessagesCount = parcel.readInt() + isHasAttachments = parcel.getBoolean() + updateTime = parcel.readLong() + payload = parcel.readString() + keyboard = parcel.readTypedObjectCompat(Keyboard.CREATOR) } @AbsModelType diff --git a/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/model/ModelsBundle.kt b/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/model/ModelsBundle.kt index ba2cc184c..0fe682e70 100644 --- a/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/model/ModelsBundle.kt +++ b/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/model/ModelsBundle.kt @@ -15,8 +15,8 @@ class ModelsBundle : Parcelable, Iterable { wrappers = ArrayList(capacity) } - internal constructor(`in`: Parcel) { - wrappers = `in`.createTypedArrayList(ParcelableModelWrapper.CREATOR)!! + internal constructor(parcel: Parcel) { + wrappers = parcel.createTypedArrayList(ParcelableModelWrapper.CREATOR)!! } fun size(): Int { diff --git a/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/model/Narratives.kt b/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/model/Narratives.kt index 4b3758153..56748c6dd 100644 --- a/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/model/Narratives.kt +++ b/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/model/Narratives.kt @@ -20,11 +20,11 @@ class Narratives : Parcelable { this.owner_id = owner_id } - internal constructor(`in`: Parcel) { - id = `in`.readInt() - owner_id = `in`.readInt() - title = `in`.readString() - cover = `in`.readString() + internal constructor(parcel: Parcel) { + id = parcel.readInt() + owner_id = parcel.readInt() + title = parcel.readString() + cover = parcel.readString() } override fun writeToParcel(parcel: Parcel, i: Int) { diff --git a/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/model/News.kt b/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/model/News.kt index e298cc9a9..f9caccbe8 100644 --- a/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/model/News.kt +++ b/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/model/News.kt @@ -163,33 +163,33 @@ class News : AbsModel { private set constructor() - internal constructor(`in`: Parcel) { - type = `in`.readString() - sourceId = `in`.readInt() - source = Owner.readOwnerFromParcel(sourceId, `in`) - postType = `in`.readString() - isFinalPost = `in`.getBoolean() - copyOwnerId = `in`.readInt() - copyPostId = `in`.readInt() - copyPostDate = `in`.readLong() - date = `in`.readLong() - postId = `in`.readInt() - copyHistory = `in`.createTypedArrayList(Post.CREATOR) - text = `in`.readString() - isCanEdit = `in`.getBoolean() - isCanDelete = `in`.getBoolean() - commentCount = `in`.readInt() - isCommentCanPost = `in`.getBoolean() - likeCount = `in`.readInt() - isUserLike = `in`.getBoolean() - isCanLike = `in`.getBoolean() - isCanPublish = `in`.getBoolean() - repostsCount = `in`.readInt() - isUserReposted = `in`.getBoolean() - attachments = `in`.readTypedObjectCompat(Attachments.CREATOR) - friends = `in`.createTypedArrayList(User.CREATOR) - viewCount = `in`.readInt() - copyright = `in`.readTypedObjectCompat(Copyright.CREATOR) + internal constructor(parcel: Parcel) { + type = parcel.readString() + sourceId = parcel.readInt() + source = Owner.readOwnerFromParcel(sourceId, parcel) + postType = parcel.readString() + isFinalPost = parcel.getBoolean() + copyOwnerId = parcel.readInt() + copyPostId = parcel.readInt() + copyPostDate = parcel.readLong() + date = parcel.readLong() + postId = parcel.readInt() + copyHistory = parcel.createTypedArrayList(Post.CREATOR) + text = parcel.readString() + isCanEdit = parcel.getBoolean() + isCanDelete = parcel.getBoolean() + commentCount = parcel.readInt() + isCommentCanPost = parcel.getBoolean() + likeCount = parcel.readInt() + isUserLike = parcel.getBoolean() + isCanLike = parcel.getBoolean() + isCanPublish = parcel.getBoolean() + repostsCount = parcel.readInt() + isUserReposted = parcel.getBoolean() + attachments = parcel.readTypedObjectCompat(Attachments.CREATOR) + friends = parcel.createTypedArrayList(User.CREATOR) + viewCount = parcel.readInt() + copyright = parcel.readTypedObjectCompat(Copyright.CREATOR) } @AbsModelType diff --git a/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/model/NotSupported.kt b/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/model/NotSupported.kt index ec50343b4..9bb80badd 100644 --- a/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/model/NotSupported.kt +++ b/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/model/NotSupported.kt @@ -8,9 +8,9 @@ class NotSupported : AbsModel { private var body: String? = null constructor() - internal constructor(`in`: Parcel) { - type = `in`.readString() - body = `in`.readString() + internal constructor(parcel: Parcel) { + type = parcel.readString() + body = parcel.readString() } override fun writeToParcel(parcel: Parcel, flags: Int) { diff --git a/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/model/Owner.kt b/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/model/Owner.kt index 29874d28a..f0b19db6f 100644 --- a/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/model/Owner.kt +++ b/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/model/Owner.kt @@ -15,12 +15,12 @@ sealed class Owner : AbsModel, ParcelNative.ParcelableNative { this.ownerType = ownerType } - constructor(`in`: Parcel) { - ownerType = `in`.readInt() + constructor(parcel: Parcel) { + ownerType = parcel.readInt() } - constructor(`in`: ParcelNative) { - ownerType = `in`.readInt() + constructor(parcel: ParcelNative) { + ownerType = parcel.readInt() } override fun writeToParcel(parcel: Parcel, flags: Int) { @@ -70,15 +70,15 @@ sealed class Owner : AbsModel, ParcelNative.ParcelableNative { } companion object { - fun readOwnerFromParcel(`in`: Parcel): Owner? { - val ownerType = `in`.readInt() - return if (ownerType == OwnerType.COMMUNITY) `in`.readTypedObjectCompat(Community.CREATOR) else `in`.readTypedObjectCompat( + fun readOwnerFromParcel(parcel: Parcel): Owner? { + val ownerType = parcel.readInt() + return if (ownerType == OwnerType.COMMUNITY) parcel.readTypedObjectCompat(Community.CREATOR) else parcel.readTypedObjectCompat( User.CREATOR ) } - fun readOwnerFromParcel(id: Int, `in`: Parcel): Owner? { - return if (id <= 0) `in`.readTypedObjectCompat(Community.CREATOR) else `in`.readTypedObjectCompat( + fun readOwnerFromParcel(id: Int, parcel: Parcel): Owner? { + return if (id <= 0) parcel.readTypedObjectCompat(Community.CREATOR) else parcel.readTypedObjectCompat( User.CREATOR ) } diff --git a/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/model/ParcelableModelWrapper.kt b/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/model/ParcelableModelWrapper.kt index 146ff1ca3..d60f59937 100644 --- a/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/model/ParcelableModelWrapper.kt +++ b/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/model/ParcelableModelWrapper.kt @@ -17,26 +17,26 @@ class ParcelableModelWrapper : Parcelable { @JvmField val CREATOR: Parcelable.Creator = object : Parcelable.Creator { - override fun createFromParcel(`in`: Parcel): ParcelableModelWrapper { - return ParcelableModelWrapper(`in`) + override fun createFromParcel(parcel: Parcel): ParcelableModelWrapper { + return ParcelableModelWrapper(parcel) } override fun newArray(size: Int): Array { return arrayOfNulls(size) } } - private val TYPES: ArrayMap AbsModel?> = ArrayMap(43) + private val TYPES: ArrayMap AbsModel?> = ArrayMap(43) fun wrap(model: AbsModel): ParcelableModelWrapper { return ParcelableModelWrapper(model) } - fun readModel(`in`: Parcel): AbsModel? { - val ex = `in`.getBoolean() + fun readModel(parcel: Parcel): AbsModel? { + val ex = parcel.getBoolean() if (!ex) { return null } - return `in`.readTypedObjectCompat(CREATOR) + return parcel.readTypedObjectCompat(CREATOR) ?.get() } @@ -61,15 +61,15 @@ class ParcelableModelWrapper : Parcelable { } } - fun readModels(`in`: Parcel): ArrayList? { - val ex = `in`.getBoolean() + fun readModels(parcel: Parcel): ArrayList? { + val ex = parcel.getBoolean() if (!ex) { return null } - val sz = `in`.readInt() + val sz = parcel.readInt() val ret: ArrayList = ArrayList(sz) for (i in 0 until sz) { - ret.add((`in`.readTypedObjectCompat(CREATOR) ?: return null).get()) + ret.add((parcel.readTypedObjectCompat(CREATOR) ?: return null).get()) } return ret } @@ -139,9 +139,9 @@ class ParcelableModelWrapper : Parcelable { this.model = model } - internal constructor(`in`: Parcel) { - val index = `in`.readInt() - model = TYPES[index]!!.invoke(`in`)!! + internal constructor(parcel: Parcel) { + val index = parcel.readInt() + model = TYPES[index]!!.invoke(parcel)!! } override fun describeContents(): Int { diff --git a/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/model/ParcelableOwnerWrapper.kt b/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/model/ParcelableOwnerWrapper.kt index ea8a4aab5..723b05cd6 100644 --- a/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/model/ParcelableOwnerWrapper.kt +++ b/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/model/ParcelableOwnerWrapper.kt @@ -20,28 +20,28 @@ class ParcelableOwnerWrapper : Parcelable, ParcelNative.ParcelableNative { isNull = owner == null } - internal constructor(`in`: Parcel) { - type = `in`.readInt() - isNull = `in`.getBoolean() + internal constructor(parcel: Parcel) { + type = parcel.readInt() + isNull = parcel.getBoolean() owner = if (!isNull) { if (type == OwnerType.USER) { - `in`.readTypedObjectCompat(User.CREATOR) + parcel.readTypedObjectCompat(User.CREATOR) } else { - `in`.readTypedObjectCompat(Community.CREATOR) + parcel.readTypedObjectCompat(Community.CREATOR) } } else { null } } - internal constructor(`in`: ParcelNative) { - type = `in`.readInt() - isNull = `in`.readBoolean() + internal constructor(parcel: ParcelNative) { + type = parcel.readInt() + isNull = parcel.readBoolean() owner = if (!isNull) { if (type == OwnerType.USER) { - `in`.readParcelable(User.NativeCreator) + parcel.readParcelable(User.NativeCreator) } else { - `in`.readParcelable(Community.NativeCreator) + parcel.readParcelable(Community.NativeCreator) } } else { null @@ -76,8 +76,8 @@ class ParcelableOwnerWrapper : Parcelable, ParcelNative.ParcelableNative { @JvmField val CREATOR: Parcelable.Creator = object : Parcelable.Creator { - override fun createFromParcel(`in`: Parcel): ParcelableOwnerWrapper { - return ParcelableOwnerWrapper(`in`) + override fun createFromParcel(parcel: Parcel): ParcelableOwnerWrapper { + return ParcelableOwnerWrapper(parcel) } override fun newArray(size: Int): Array { @@ -98,16 +98,16 @@ class ParcelableOwnerWrapper : Parcelable, ParcelNative.ParcelableNative { return ParcelableOwnerWrapper(owner) } - fun readOwner(`in`: ParcelNative): Owner? { - return `in`.readParcelable(NativeCreator)?.get() + fun readOwner(parcel: ParcelNative): Owner? { + return parcel.readParcelable(NativeCreator)?.get() } fun writeOwner(dest: ParcelNative, owner: Owner?) { dest.writeParcelable(ParcelableOwnerWrapper(owner)) } - fun readOwner(`in`: Parcel): Owner? { - return `in`.readTypedObjectCompat(CREATOR) + fun readOwner(parcel: Parcel): Owner? { + return parcel.readTypedObjectCompat(CREATOR) ?.get() } @@ -115,15 +115,15 @@ class ParcelableOwnerWrapper : Parcelable, ParcelNative.ParcelableNative { dest.writeTypedObjectCompat(ParcelableOwnerWrapper(owner), flags) } - fun readOwners(`in`: Parcel): List? { - val isNull = `in`.getBoolean() + fun readOwners(parcel: Parcel): List? { + val isNull = parcel.getBoolean() if (isNull) { return null } - val ownersCount = `in`.readInt() + val ownersCount = parcel.readInt() val owners: MutableList = ArrayList(ownersCount) for (i in 0 until ownersCount) { - readOwner(`in`)?.let { owners.add(it) } + readOwner(parcel)?.let { owners.add(it) } } return owners } @@ -140,15 +140,15 @@ class ParcelableOwnerWrapper : Parcelable, ParcelNative.ParcelableNative { } } - fun readOwners(`in`: ParcelNative): List? { - val isNull = `in`.readBoolean() + fun readOwners(parcel: ParcelNative): List? { + val isNull = parcel.readBoolean() if (isNull) { return null } - val ownersCount = `in`.readInt() + val ownersCount = parcel.readInt() val owners: MutableList = ArrayList(ownersCount) for (i in 0 until ownersCount) { - readOwner(`in`)?.let { owners.add(it) } + readOwner(parcel)?.let { owners.add(it) } } return owners } diff --git a/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/model/Peer.kt b/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/model/Peer.kt index b1fc5ff35..03401211d 100644 --- a/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/model/Peer.kt +++ b/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/model/Peer.kt @@ -17,10 +17,10 @@ class Peer : Parcelable { this.id = id } - internal constructor(`in`: Parcel) { - id = `in`.readInt() - title = `in`.readString() - avaUrl = `in`.readString() + internal constructor(parcel: Parcel) { + id = parcel.readInt() + title = parcel.readString() + avaUrl = parcel.readString() } fun getTitle(): String? { @@ -60,8 +60,8 @@ class Peer : Parcelable { // Для сообщества: -id сообщества. @JvmField val CREATOR: Parcelable.Creator = object : Parcelable.Creator { - override fun createFromParcel(`in`: Parcel): Peer { - return Peer(`in`) + override fun createFromParcel(parcel: Parcel): Peer { + return Peer(parcel) } override fun newArray(size: Int): Array { diff --git a/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/model/Photo.kt b/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/model/Photo.kt index c949b2722..318abb59e 100644 --- a/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/model/Photo.kt +++ b/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/model/Photo.kt @@ -52,48 +52,48 @@ class Photo : AbsModel, ISomeones, ParcelNative.ParcelableNative { private set constructor() - internal constructor(`in`: ParcelNative) { - id = `in`.readInt() - ownerId = `in`.readInt() - albumId = `in`.readInt() - width = `in`.readInt() - height = `in`.readInt() - sizes = `in`.readParcelable(PhotoSizes.NativeCreator) - text = `in`.readString() - date = `in`.readLong() - isUserLikes = `in`.readBoolean() - isCanComment = `in`.readBoolean() - likesCount = `in`.readInt() - commentsCount = `in`.readInt() - tagsCount = `in`.readInt() - accessKey = `in`.readString() - isDeleted = `in`.readBoolean() - postId = `in`.readInt() - repostsCount = `in`.readInt() - msgId = `in`.readInt() - msgPeerId = `in`.readInt() + internal constructor(parcel: ParcelNative) { + id = parcel.readInt() + ownerId = parcel.readInt() + albumId = parcel.readInt() + width = parcel.readInt() + height = parcel.readInt() + sizes = parcel.readParcelable(PhotoSizes.NativeCreator) + text = parcel.readString() + date = parcel.readLong() + isUserLikes = parcel.readBoolean() + isCanComment = parcel.readBoolean() + likesCount = parcel.readInt() + commentsCount = parcel.readInt() + tagsCount = parcel.readInt() + accessKey = parcel.readString() + isDeleted = parcel.readBoolean() + postId = parcel.readInt() + repostsCount = parcel.readInt() + msgId = parcel.readInt() + msgPeerId = parcel.readInt() } - internal constructor(`in`: Parcel) { - id = `in`.readInt() - ownerId = `in`.readInt() - albumId = `in`.readInt() - width = `in`.readInt() - height = `in`.readInt() - sizes = `in`.readTypedObjectCompat(PhotoSizes.CREATOR) - text = `in`.readString() - date = `in`.readLong() - isUserLikes = `in`.getBoolean() - isCanComment = `in`.getBoolean() - likesCount = `in`.readInt() - commentsCount = `in`.readInt() - tagsCount = `in`.readInt() - accessKey = `in`.readString() - isDeleted = `in`.getBoolean() - postId = `in`.readInt() - repostsCount = `in`.readInt() - msgId = `in`.readInt() - msgPeerId = `in`.readInt() + internal constructor(parcel: Parcel) { + id = parcel.readInt() + ownerId = parcel.readInt() + albumId = parcel.readInt() + width = parcel.readInt() + height = parcel.readInt() + sizes = parcel.readTypedObjectCompat(PhotoSizes.CREATOR) + text = parcel.readString() + date = parcel.readLong() + isUserLikes = parcel.getBoolean() + isCanComment = parcel.getBoolean() + likesCount = parcel.readInt() + commentsCount = parcel.readInt() + tagsCount = parcel.readInt() + accessKey = parcel.readString() + isDeleted = parcel.getBoolean() + postId = parcel.readInt() + repostsCount = parcel.readInt() + msgId = parcel.readInt() + msgPeerId = parcel.readInt() } @AbsModelType @@ -272,8 +272,8 @@ class Photo : AbsModel, ISomeones, ParcelNative.ParcelableNative { companion object { @JvmField val CREATOR: Parcelable.Creator = object : Parcelable.Creator { - override fun createFromParcel(`in`: Parcel): Photo { - return Photo(`in`) + override fun createFromParcel(parcel: Parcel): Photo { + return Photo(parcel) } override fun newArray(size: Int): Array { diff --git a/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/model/PhotoAlbum.kt b/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/model/PhotoAlbum.kt index 5e6f0cc91..eaac79fc4 100644 --- a/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/model/PhotoAlbum.kt +++ b/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/model/PhotoAlbum.kt @@ -26,20 +26,20 @@ class PhotoAlbum : AbsModel, ISomeones { this.ownerId = ownerId } - internal constructor(`in`: Parcel) { - id = `in`.readInt() - ownerId = `in`.readInt() - size = `in`.readInt() - title = `in`.readString() - description = `in`.readString() - canUpload = `in`.getBoolean() - updatedTime = `in`.readLong() - createdTime = `in`.readLong() - sizes = `in`.readTypedObjectCompat(PhotoSizes.CREATOR) - uploadByAdminsOnly = `in`.getBoolean() - commentsDisabled = `in`.getBoolean() - privacyView = `in`.readTypedObjectCompat(SimplePrivacy.CREATOR) - privacyComment = `in`.readTypedObjectCompat(SimplePrivacy.CREATOR) + internal constructor(parcel: Parcel) { + id = parcel.readInt() + ownerId = parcel.readInt() + size = parcel.readInt() + title = parcel.readString() + description = parcel.readString() + canUpload = parcel.getBoolean() + updatedTime = parcel.readLong() + createdTime = parcel.readLong() + sizes = parcel.readTypedObjectCompat(PhotoSizes.CREATOR) + uploadByAdminsOnly = parcel.getBoolean() + commentsDisabled = parcel.getBoolean() + privacyView = parcel.readTypedObjectCompat(SimplePrivacy.CREATOR) + privacyComment = parcel.readTypedObjectCompat(SimplePrivacy.CREATOR) } override fun writeToParcel(parcel: Parcel, flags: Int) { diff --git a/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/model/PhotoAlbumEditor.kt b/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/model/PhotoAlbumEditor.kt index ddac645e2..e4aaacc50 100644 --- a/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/model/PhotoAlbumEditor.kt +++ b/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/model/PhotoAlbumEditor.kt @@ -16,13 +16,13 @@ class PhotoAlbumEditor : Parcelable { private var uploadByAdminsOnly = false private constructor() - internal constructor(`in`: Parcel) { - title = `in`.readString() - description = `in`.readString() - privacyView = `in`.readTypedObjectCompat(Privacy.CREATOR) - privacyComment = `in`.readTypedObjectCompat(Privacy.CREATOR) - commentsDisabled = `in`.getBoolean() - uploadByAdminsOnly = `in`.getBoolean() + internal constructor(parcel: Parcel) { + title = parcel.readString() + description = parcel.readString() + privacyView = parcel.readTypedObjectCompat(Privacy.CREATOR) + privacyComment = parcel.readTypedObjectCompat(Privacy.CREATOR) + commentsDisabled = parcel.getBoolean() + uploadByAdminsOnly = parcel.getBoolean() } fun getTitle(): String? { @@ -96,8 +96,8 @@ class PhotoAlbumEditor : Parcelable { @JvmField val CREATOR: Parcelable.Creator = object : Parcelable.Creator { - override fun createFromParcel(`in`: Parcel): PhotoAlbumEditor { - return PhotoAlbumEditor(`in`) + override fun createFromParcel(parcel: Parcel): PhotoAlbumEditor { + return PhotoAlbumEditor(parcel) } override fun newArray(size: Int): Array { diff --git a/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/model/PhotoSizes.kt b/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/model/PhotoSizes.kt index c90a19aca..78691b635 100644 --- a/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/model/PhotoSizes.kt +++ b/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/model/PhotoSizes.kt @@ -24,30 +24,30 @@ class PhotoSizes : Parcelable, ParcelNative.ParcelableNative { private var w: Size? = null constructor() - internal constructor(`in`: ParcelNative) { - s = `in`.readParcelable(Size.NativeCreator) - m = `in`.readParcelable(Size.NativeCreator) - x = `in`.readParcelable(Size.NativeCreator) - o = `in`.readParcelable(Size.NativeCreator) - p = `in`.readParcelable(Size.NativeCreator) - q = `in`.readParcelable(Size.NativeCreator) - r = `in`.readParcelable(Size.NativeCreator) - y = `in`.readParcelable(Size.NativeCreator) - z = `in`.readParcelable(Size.NativeCreator) - w = `in`.readParcelable(Size.NativeCreator) - } - - internal constructor(`in`: Parcel) { - s = `in`.readTypedObjectCompat(Size.CREATOR) - m = `in`.readTypedObjectCompat(Size.CREATOR) - x = `in`.readTypedObjectCompat(Size.CREATOR) - o = `in`.readTypedObjectCompat(Size.CREATOR) - p = `in`.readTypedObjectCompat(Size.CREATOR) - q = `in`.readTypedObjectCompat(Size.CREATOR) - r = `in`.readTypedObjectCompat(Size.CREATOR) - y = `in`.readTypedObjectCompat(Size.CREATOR) - z = `in`.readTypedObjectCompat(Size.CREATOR) - w = `in`.readTypedObjectCompat(Size.CREATOR) + internal constructor(parcel: ParcelNative) { + s = parcel.readParcelable(Size.NativeCreator) + m = parcel.readParcelable(Size.NativeCreator) + x = parcel.readParcelable(Size.NativeCreator) + o = parcel.readParcelable(Size.NativeCreator) + p = parcel.readParcelable(Size.NativeCreator) + q = parcel.readParcelable(Size.NativeCreator) + r = parcel.readParcelable(Size.NativeCreator) + y = parcel.readParcelable(Size.NativeCreator) + z = parcel.readParcelable(Size.NativeCreator) + w = parcel.readParcelable(Size.NativeCreator) + } + + internal constructor(parcel: Parcel) { + s = parcel.readTypedObjectCompat(Size.CREATOR) + m = parcel.readTypedObjectCompat(Size.CREATOR) + x = parcel.readTypedObjectCompat(Size.CREATOR) + o = parcel.readTypedObjectCompat(Size.CREATOR) + p = parcel.readTypedObjectCompat(Size.CREATOR) + q = parcel.readTypedObjectCompat(Size.CREATOR) + r = parcel.readTypedObjectCompat(Size.CREATOR) + y = parcel.readTypedObjectCompat(Size.CREATOR) + z = parcel.readTypedObjectCompat(Size.CREATOR) + w = parcel.readTypedObjectCompat(Size.CREATOR) } fun getS(): Size? { @@ -258,16 +258,16 @@ class PhotoSizes : Parcelable, ParcelNative.ParcelableNative { this.url = url } - internal constructor(`in`: ParcelNative) { - width = `in`.readInt() - height = `in`.readInt() - url = `in`.readString() + internal constructor(parcel: ParcelNative) { + width = parcel.readInt() + height = parcel.readInt() + url = parcel.readString() } - internal constructor(`in`: Parcel) { - width = `in`.readInt() - height = `in`.readInt() - url = `in`.readString() + internal constructor(parcel: Parcel) { + width = parcel.readInt() + height = parcel.readInt() + url = parcel.readString() } fun getW(): Int { @@ -297,8 +297,8 @@ class PhotoSizes : Parcelable, ParcelNative.ParcelableNative { companion object { @JvmField val CREATOR: Parcelable.Creator = object : Parcelable.Creator { - override fun createFromParcel(`in`: Parcel): Size { - return Size(`in`) + override fun createFromParcel(parcel: Parcel): Size { + return Size(parcel) } override fun newArray(size: Int): Array { @@ -318,8 +318,8 @@ class PhotoSizes : Parcelable, ParcelNative.ParcelableNative { companion object { @JvmField val CREATOR: Parcelable.Creator = object : Parcelable.Creator { - override fun createFromParcel(`in`: Parcel): PhotoSizes { - return PhotoSizes(`in`) + override fun createFromParcel(parcel: Parcel): PhotoSizes { + return PhotoSizes(parcel) } override fun newArray(size: Int): Array { diff --git a/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/model/Poll.kt b/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/model/Poll.kt index d9ff68ebe..d65d1c4ff 100644 --- a/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/model/Poll.kt +++ b/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/model/Poll.kt @@ -41,25 +41,25 @@ class Poll : AbsModel { var photo: String? = null private set - internal constructor(`in`: Parcel) { - id = `in`.readInt() - ownerId = `in`.readInt() - creationTime = `in`.readLong() - question = `in`.readString() - voteCount = `in`.readInt() - myAnswerIds = `in`.createLongArray() - isAnonymous = `in`.getBoolean() - answers = `in`.createTypedArrayList(Answer.CREATOR) - isBoard = `in`.getBoolean() - isClosed = `in`.getBoolean() - authorId = `in`.readInt() - isCanVote = `in`.getBoolean() - isCanEdit = `in`.getBoolean() - isCanReport = `in`.getBoolean() - isCanShare = `in`.getBoolean() - endDate = `in`.readLong() - isMultiple = `in`.getBoolean() - photo = `in`.readString() + internal constructor(parcel: Parcel) { + id = parcel.readInt() + ownerId = parcel.readInt() + creationTime = parcel.readLong() + question = parcel.readString() + voteCount = parcel.readInt() + myAnswerIds = parcel.createLongArray() + isAnonymous = parcel.getBoolean() + answers = parcel.createTypedArrayList(Answer.CREATOR) + isBoard = parcel.getBoolean() + isClosed = parcel.getBoolean() + authorId = parcel.readInt() + isCanVote = parcel.getBoolean() + isCanEdit = parcel.getBoolean() + isCanReport = parcel.getBoolean() + isCanShare = parcel.getBoolean() + endDate = parcel.readLong() + isMultiple = parcel.getBoolean() + photo = parcel.readString() } constructor(id: Int, ownerId: Int) { @@ -190,11 +190,11 @@ class Poll : AbsModel { this.id = id } - internal constructor(`in`: Parcel) { - id = `in`.readLong() - text = `in`.readString() - voteCount = `in`.readInt() - rate = `in`.readDouble() + internal constructor(parcel: Parcel) { + id = parcel.readLong() + text = parcel.readString() + voteCount = parcel.readInt() + rate = parcel.readDouble() } override fun writeToParcel(parcel: Parcel, flags: Int) { diff --git a/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/model/Post.kt b/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/model/Post.kt index 4b8bf8a69..0709bb4e3 100644 --- a/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/model/Post.kt +++ b/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/model/Post.kt @@ -69,39 +69,42 @@ class Post : AbsModel, Cloneable { private set var copyright: Copyright? = null private set + var isDonut = false + private set - internal constructor(`in`: Parcel) { - dbid = `in`.readInt() - vkid = `in`.readInt() - ownerId = `in`.readInt() - authorId = `in`.readInt() - author = Owner.readOwnerFromParcel(authorId, `in`) - date = `in`.readLong() - text = `in`.readString() - replyOwnerId = `in`.readInt() - replyPostId = `in`.readInt() - isFriendsOnly = `in`.getBoolean() - commentsCount = `in`.readInt() - isCanPostComment = `in`.getBoolean() - likesCount = `in`.readInt() - isCanLike = `in`.getBoolean() - repostCount = `in`.readInt() - isCanRepost = `in`.getBoolean() - isUserReposted = `in`.getBoolean() - postType = `in`.readInt() - attachments = `in`.readTypedObjectCompat(Attachments.CREATOR) - signerId = `in`.readInt() - creatorId = `in`.readInt() - creator = `in`.readTypedObjectCompat(User.CREATOR) - isCanPin = `in`.getBoolean() - isPinned = `in`.getBoolean() - copyHierarchy = `in`.createTypedArrayList(CREATOR) - isDeleted = `in`.getBoolean() - source = `in`.readTypedObjectCompat(PostSource.CREATOR) - viewCount = `in`.readInt() - isCanEdit = `in`.getBoolean() - isFavorite = `in`.getBoolean() - copyright = `in`.readTypedObjectCompat(Copyright.CREATOR) + internal constructor(parcel: Parcel) { + dbid = parcel.readInt() + vkid = parcel.readInt() + ownerId = parcel.readInt() + authorId = parcel.readInt() + author = Owner.readOwnerFromParcel(authorId, parcel) + date = parcel.readLong() + text = parcel.readString() + replyOwnerId = parcel.readInt() + replyPostId = parcel.readInt() + isFriendsOnly = parcel.getBoolean() + commentsCount = parcel.readInt() + isCanPostComment = parcel.getBoolean() + likesCount = parcel.readInt() + isCanLike = parcel.getBoolean() + repostCount = parcel.readInt() + isCanRepost = parcel.getBoolean() + isUserReposted = parcel.getBoolean() + postType = parcel.readInt() + attachments = parcel.readTypedObjectCompat(Attachments.CREATOR) + signerId = parcel.readInt() + creatorId = parcel.readInt() + creator = parcel.readTypedObjectCompat(User.CREATOR) + isCanPin = parcel.getBoolean() + isPinned = parcel.getBoolean() + copyHierarchy = parcel.createTypedArrayList(CREATOR) + isDeleted = parcel.getBoolean() + source = parcel.readTypedObjectCompat(PostSource.CREATOR) + viewCount = parcel.readInt() + isCanEdit = parcel.getBoolean() + isFavorite = parcel.getBoolean() + copyright = parcel.readTypedObjectCompat(Copyright.CREATOR) + isDonut = parcel.getBoolean() } constructor() @@ -131,6 +134,11 @@ class Post : AbsModel, Cloneable { return this } + fun setIsDonut(isDonut: Boolean): Post { + this.isDonut = isDonut + return this + } + fun setFavorite(favorite: Boolean): Post { isFavorite = favorite return this @@ -312,6 +320,7 @@ class Post : AbsModel, Cloneable { parcel.putBoolean(isCanEdit) parcel.putBoolean(isFavorite) parcel.writeTypedObjectCompat(copyright, flags) + parcel.putBoolean(isDonut) } /** diff --git a/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/model/PostFilter.kt b/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/model/PostFilter.kt index 8814bb21e..c152899c0 100644 --- a/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/model/PostFilter.kt +++ b/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/model/PostFilter.kt @@ -18,11 +18,11 @@ class PostFilter : Entry, Parcelable { this.title = title } - internal constructor(`in`: Parcel) { - mode = `in`.readInt() - title = `in`.readString()!! - active = `in`.getBoolean() - count = `in`.readInt() + internal constructor(parcel: Parcel) { + mode = parcel.readInt() + title = parcel.readString()!! + active = parcel.getBoolean() + count = parcel.readInt() } fun getTitle(): String { diff --git a/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/model/PostSource.kt b/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/model/PostSource.kt index 6cd504200..a54e0a9a1 100644 --- a/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/model/PostSource.kt +++ b/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/model/PostSource.kt @@ -16,11 +16,11 @@ class PostSource : Parcelable { this.url = url } - internal constructor(`in`: Parcel) { - type = `in`.readInt() - platform = `in`.readString() - data = `in`.readInt() - url = `in`.readString() + internal constructor(parcel: Parcel) { + type = parcel.readInt() + platform = parcel.readString() + data = parcel.readInt() + url = parcel.readString() } fun getUrl(): String? { diff --git a/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/model/Privacy.kt b/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/model/Privacy.kt index bc85b1cb3..dfcf3db9a 100644 --- a/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/model/Privacy.kt +++ b/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/model/Privacy.kt @@ -24,12 +24,12 @@ class Privacy : Parcelable, Cloneable { disallowedLists = ArrayList() } - internal constructor(`in`: Parcel) { - type = `in`.readString()!! - allowedUsers = `in`.createTypedArrayList(User.CREATOR)!! - disallowedUsers = `in`.createTypedArrayList(User.CREATOR)!! - allowedLists = `in`.createTypedArrayList(FriendList.CREATOR)!! - disallowedLists = `in`.createTypedArrayList(FriendList.CREATOR)!! + internal constructor(parcel: Parcel) { + type = parcel.readString()!! + allowedUsers = parcel.createTypedArrayList(User.CREATOR)!! + disallowedUsers = parcel.createTypedArrayList(User.CREATOR)!! + allowedLists = parcel.createTypedArrayList(FriendList.CREATOR)!! + disallowedLists = parcel.createTypedArrayList(FriendList.CREATOR)!! } override fun describeContents(): Int { diff --git a/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/model/SelectProfileCriteria.kt b/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/model/SelectProfileCriteria.kt index 261fca978..0b384aecb 100644 --- a/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/model/SelectProfileCriteria.kt +++ b/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/model/SelectProfileCriteria.kt @@ -8,8 +8,8 @@ class SelectProfileCriteria : Parcelable { @OwnerType private var ownerType: Int - internal constructor(`in`: Parcel) { - ownerType = `in`.readInt() + internal constructor(parcel: Parcel) { + ownerType = parcel.readInt() } constructor() { diff --git a/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/model/ShortLink.kt b/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/model/ShortLink.kt index cad92cbc1..ad00ce085 100644 --- a/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/model/ShortLink.kt +++ b/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/model/ShortLink.kt @@ -18,13 +18,13 @@ class ShortLink : AbsModel { private set constructor() - internal constructor(`in`: Parcel) { - short_url = `in`.readString() - url = `in`.readString() - timestamp = `in`.readLong() - key = `in`.readString() - views = `in`.readInt() - access_key = `in`.readString() + internal constructor(parcel: Parcel) { + short_url = parcel.readString() + url = parcel.readString() + timestamp = parcel.readLong() + key = parcel.readString() + views = parcel.readInt() + access_key = parcel.readString() } override fun writeToParcel(parcel: Parcel, flags: Int) { diff --git a/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/model/SimplePrivacy.kt b/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/model/SimplePrivacy.kt index 92e87350a..8f5b701e9 100644 --- a/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/model/SimplePrivacy.kt +++ b/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/model/SimplePrivacy.kt @@ -15,14 +15,14 @@ class SimplePrivacy : Parcelable, ParcelNative.ParcelableNative { this.entries = entries } - internal constructor(`in`: Parcel) { - type = `in`.readString() - entries = `in`.createTypedArrayList(Entry.CREATOR) + internal constructor(parcel: Parcel) { + type = parcel.readString() + entries = parcel.createTypedArrayList(Entry.CREATOR) } - internal constructor(`in`: ParcelNative) { - type = `in`.readString() - entries = `in`.readParcelableList(Entry.NativeCreator) + internal constructor(parcel: ParcelNative) { + type = parcel.readString() + entries = parcel.readParcelableList(Entry.NativeCreator) } fun getType(): String? { @@ -58,16 +58,16 @@ class SimplePrivacy : Parcelable, ParcelNative.ParcelableNative { this.allowed = allowed } - internal constructor(`in`: Parcel) { - type = `in`.readInt() - id = `in`.readInt() - allowed = `in`.getBoolean() + internal constructor(parcel: Parcel) { + type = parcel.readInt() + id = parcel.readInt() + allowed = parcel.getBoolean() } - internal constructor(`in`: ParcelNative) { - type = `in`.readInt() - id = `in`.readInt() - allowed = `in`.readBoolean() + internal constructor(parcel: ParcelNative) { + type = parcel.readInt() + id = parcel.readInt() + allowed = parcel.readBoolean() } fun getType(): Int { @@ -118,8 +118,8 @@ class SimplePrivacy : Parcelable, ParcelNative.ParcelableNative { @JvmField val CREATOR: Parcelable.Creator = object : Parcelable.Creator { - override fun createFromParcel(`in`: Parcel): Entry { - return Entry(`in`) + override fun createFromParcel(parcel: Parcel): Entry { + return Entry(parcel) } override fun newArray(size: Int): Array { @@ -140,8 +140,8 @@ class SimplePrivacy : Parcelable, ParcelNative.ParcelableNative { @JvmField val CREATOR: Parcelable.Creator = object : Parcelable.Creator { - override fun createFromParcel(`in`: Parcel): SimplePrivacy { - return SimplePrivacy(`in`) + override fun createFromParcel(parcel: Parcel): SimplePrivacy { + return SimplePrivacy(parcel) } override fun newArray(size: Int): Array { diff --git a/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/model/Sticker.kt b/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/model/Sticker.kt index 4b414bad8..898cde104 100644 --- a/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/model/Sticker.kt +++ b/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/model/Sticker.kt @@ -23,12 +23,12 @@ class Sticker : AbsModel { this.id = id } - internal constructor(`in`: Parcel) { - id = `in`.readInt() - images = `in`.createTypedArrayList(Image.CREATOR) - imagesWithBackground = `in`.createTypedArrayList(Image.CREATOR) - animations = `in`.createTypedArrayList(Animation.CREATOR) - animationUrl = `in`.readString() + internal constructor(parcel: Parcel) { + id = parcel.readInt() + images = parcel.createTypedArrayList(Image.CREATOR) + imagesWithBackground = parcel.createTypedArrayList(Image.CREATOR) + animations = parcel.createTypedArrayList(Animation.CREATOR) + animationUrl = parcel.readString() } @AbsModelType @@ -139,10 +139,10 @@ class Sticker : AbsModel { this.height = height } - internal constructor(`in`: Parcel) { - url = `in`.readString() - width = `in`.readInt() - height = `in`.readInt() + internal constructor(parcel: Parcel) { + url = parcel.readString() + width = parcel.readInt() + height = parcel.readInt() } override fun describeContents(): Int { @@ -179,9 +179,9 @@ class Sticker : AbsModel { this.type = type } - internal constructor(`in`: Parcel) { - url = `in`.readString() - type = `in`.readString() + internal constructor(parcel: Parcel) { + url = parcel.readString() + type = parcel.readString() } override fun describeContents(): Int { diff --git a/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/model/StickersKeywords.kt b/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/model/StickersKeywords.kt index 970b1ac4b..fd3281958 100644 --- a/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/model/StickersKeywords.kt +++ b/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/model/StickersKeywords.kt @@ -7,10 +7,10 @@ class StickersKeywords : Parcelable { private val keywords: List? private val stickers: List? - internal constructor(`in`: Parcel) { + internal constructor(parcel: Parcel) { keywords = ArrayList() - `in`.readStringList(keywords) - stickers = `in`.createTypedArrayList(Sticker.CREATOR) + parcel.readStringList(keywords) + stickers = parcel.createTypedArrayList(Sticker.CREATOR) } constructor(keywords: List?, stickers: List?) { diff --git a/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/model/Story.kt b/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/model/Story.kt index 09bc7ed6a..6f7968e2b 100644 --- a/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/model/Story.kt +++ b/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/model/Story.kt @@ -33,30 +33,30 @@ class Story : AbsModel, ParcelNative.ParcelableNative { private set constructor() - internal constructor(`in`: Parcel) { - id = `in`.readInt() - ownerId = `in`.readInt() - date = `in`.readLong() - expires = `in`.readLong() - isIs_expired = `in`.getBoolean() - accessKey = `in`.readString() - target_url = `in`.readString() - video = `in`.readTypedObjectCompat(Video.CREATOR) - photo = `in`.readTypedObjectCompat(Photo.CREATOR) - owner = readOwner(`in`) - } - - internal constructor(`in`: ParcelNative) { - id = `in`.readInt() - ownerId = `in`.readInt() - date = `in`.readLong() - expires = `in`.readLong() - isIs_expired = `in`.readBoolean() - accessKey = `in`.readString() - target_url = `in`.readString() - video = `in`.readParcelable(Video.NativeCreator) - photo = `in`.readParcelable(Photo.NativeCreator) - owner = readOwner(`in`) + internal constructor(parcel: Parcel) { + id = parcel.readInt() + ownerId = parcel.readInt() + date = parcel.readLong() + expires = parcel.readLong() + isIs_expired = parcel.getBoolean() + accessKey = parcel.readString() + target_url = parcel.readString() + video = parcel.readTypedObjectCompat(Video.CREATOR) + photo = parcel.readTypedObjectCompat(Photo.CREATOR) + owner = readOwner(parcel) + } + + internal constructor(parcel: ParcelNative) { + id = parcel.readInt() + ownerId = parcel.readInt() + date = parcel.readLong() + expires = parcel.readLong() + isIs_expired = parcel.readBoolean() + accessKey = parcel.readString() + target_url = parcel.readString() + video = parcel.readParcelable(Video.NativeCreator) + photo = parcel.readParcelable(Photo.NativeCreator) + owner = readOwner(parcel) } override fun writeToParcel(parcel: Parcel, flags: Int) { @@ -162,8 +162,8 @@ class Story : AbsModel, ParcelNative.ParcelableNative { companion object { @JvmField val CREATOR: Parcelable.Creator = object : Parcelable.Creator { - override fun createFromParcel(`in`: Parcel): Story { - return Story(`in`) + override fun createFromParcel(parcel: Parcel): Story { + return Story(parcel) } override fun newArray(size: Int): Array { diff --git a/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/model/Text.kt b/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/model/Text.kt index bb24ab6fe..647df1d1e 100644 --- a/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/model/Text.kt +++ b/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/model/Text.kt @@ -20,9 +20,9 @@ class Text : Parcelable { this.text = text } - internal constructor(`in`: Parcel) { - res = readObjectInteger(`in`) - text = `in`.readString() + internal constructor(parcel: Parcel) { + res = readObjectInteger(parcel) + text = parcel.readString() } fun getText(context: Context): String? { diff --git a/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/model/TmpSource.kt b/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/model/TmpSource.kt index 584e9cd4e..7d8e56488 100644 --- a/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/model/TmpSource.kt +++ b/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/model/TmpSource.kt @@ -12,9 +12,9 @@ class TmpSource : Parcelable { this.sourceId = sourceId } - internal constructor(`in`: Parcel) { - ownerId = `in`.readInt() - sourceId = `in`.readInt() + internal constructor(parcel: Parcel) { + ownerId = parcel.readInt() + sourceId = parcel.readInt() } override fun describeContents(): Int { diff --git a/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/model/Token.kt b/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/model/Token.kt index 8a897f09d..87bd39d3c 100644 --- a/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/model/Token.kt +++ b/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/model/Token.kt @@ -12,9 +12,9 @@ class Token : Parcelable { this.accessToken = accessToken } - internal constructor(`in`: Parcel) { - ownerId = `in`.readInt() - accessToken = `in`.readString() + internal constructor(parcel: Parcel) { + ownerId = parcel.readInt() + accessToken = parcel.readString() } override fun describeContents(): Int { diff --git a/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/model/Topic.kt b/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/model/Topic.kt index 61484f5a7..5500a4485 100644 --- a/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/model/Topic.kt +++ b/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/model/Topic.kt @@ -40,21 +40,21 @@ class Topic : AbsModel { this.ownerId = ownerId } - internal constructor(`in`: Parcel) { - id = `in`.readInt() - ownerId = `in`.readInt() - title = `in`.readString() - creationTime = `in`.readLong() - createdByOwnerId = `in`.readInt() - lastUpdateTime = `in`.readLong() - updatedByOwnerId = `in`.readInt() - isClosed = `in`.getBoolean() - isFixed = `in`.getBoolean() - commentsCount = `in`.readInt() - firstCommentBody = `in`.readString() - lastCommentBody = `in`.readString() - creator = `in`.readTypedObjectCompat(ParcelableOwnerWrapper.CREATOR)?.get() - updater = `in`.readTypedObjectCompat(ParcelableOwnerWrapper.CREATOR)?.get() + internal constructor(parcel: Parcel) { + id = parcel.readInt() + ownerId = parcel.readInt() + title = parcel.readString() + creationTime = parcel.readLong() + createdByOwnerId = parcel.readInt() + lastUpdateTime = parcel.readLong() + updatedByOwnerId = parcel.readInt() + isClosed = parcel.getBoolean() + isFixed = parcel.getBoolean() + commentsCount = parcel.readInt() + firstCommentBody = parcel.readString() + lastCommentBody = parcel.readString() + creator = parcel.readTypedObjectCompat(ParcelableOwnerWrapper.CREATOR)?.get() + updater = parcel.readTypedObjectCompat(ParcelableOwnerWrapper.CREATOR)?.get() } @AbsModelType diff --git a/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/model/User.kt b/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/model/User.kt index f0d190fa6..ac26a6318 100644 --- a/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/model/User.kt +++ b/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/model/User.kt @@ -74,60 +74,60 @@ class User : Owner, Identificable { this.id = id } - internal constructor(`in`: Parcel) : super(`in`) { - id = `in`.readInt() - firstName = `in`.readString() - lastName = `in`.readString() - isOnline = `in`.getBoolean() - isOnlineMobile = `in`.getBoolean() - onlineApp = `in`.readInt() - photo50 = `in`.readString() - photo100 = `in`.readString() - photo200 = `in`.readString() - photoMax = `in`.readString() - lastSeen = `in`.readLong() - platform = `in`.readInt() - status = `in`.readString() - sex = `in`.readInt() - domain = `in`.readString() - maiden_name = `in`.readString() - isFriend = `in`.getBoolean() - friendStatus = `in`.readInt() - canWritePrivateMessage = `in`.getBoolean() - blacklisted_by_me = `in`.getBoolean() - blacklisted = `in`.getBoolean() - verified = `in`.getBoolean() - isCan_access_closed = `in`.getBoolean() - bdate = `in`.readString() - hasUnseenStories = `in`.getBoolean() - } - - internal constructor(`in`: ParcelNative) : super(`in`) { - id = `in`.readInt() - firstName = `in`.readString() - lastName = `in`.readString() - isOnline = `in`.readBoolean() - isOnlineMobile = `in`.readBoolean() - onlineApp = `in`.readInt() - photo50 = `in`.readString() - photo100 = `in`.readString() - photo200 = `in`.readString() - photoMax = `in`.readString() - lastSeen = `in`.readLong() - platform = `in`.readInt() - status = `in`.readString() - sex = `in`.readInt() - domain = `in`.readString() - maiden_name = `in`.readString() - isFriend = `in`.readBoolean() - friendStatus = `in`.readInt() - canWritePrivateMessage = `in`.readBoolean() - blacklisted_by_me = `in`.readBoolean() - blacklisted = `in`.readBoolean() - verified = `in`.readBoolean() - isCan_access_closed = `in`.readBoolean() - bdate = `in`.readString() - hasUnseenStories = `in`.readBoolean() + internal constructor(parcel: Parcel) : super(parcel) { + id = parcel.readInt() + firstName = parcel.readString() + lastName = parcel.readString() + isOnline = parcel.getBoolean() + isOnlineMobile = parcel.getBoolean() + onlineApp = parcel.readInt() + photo50 = parcel.readString() + photo100 = parcel.readString() + photo200 = parcel.readString() + photoMax = parcel.readString() + lastSeen = parcel.readLong() + platform = parcel.readInt() + status = parcel.readString() + sex = parcel.readInt() + domain = parcel.readString() + maiden_name = parcel.readString() + isFriend = parcel.getBoolean() + friendStatus = parcel.readInt() + canWritePrivateMessage = parcel.getBoolean() + blacklisted_by_me = parcel.getBoolean() + blacklisted = parcel.getBoolean() + verified = parcel.getBoolean() + isCan_access_closed = parcel.getBoolean() + bdate = parcel.readString() + hasUnseenStories = parcel.getBoolean() + } + + internal constructor(parcel: ParcelNative) : super(parcel) { + id = parcel.readInt() + firstName = parcel.readString() + lastName = parcel.readString() + isOnline = parcel.readBoolean() + isOnlineMobile = parcel.readBoolean() + onlineApp = parcel.readInt() + photo50 = parcel.readString() + photo100 = parcel.readString() + photo200 = parcel.readString() + photoMax = parcel.readString() + lastSeen = parcel.readLong() + platform = parcel.readInt() + status = parcel.readString() + sex = parcel.readInt() + domain = parcel.readString() + maiden_name = parcel.readString() + isFriend = parcel.readBoolean() + friendStatus = parcel.readInt() + canWritePrivateMessage = parcel.readBoolean() + blacklisted_by_me = parcel.readBoolean() + blacklisted = parcel.readBoolean() + verified = parcel.readBoolean() + isCan_access_closed = parcel.readBoolean() + bdate = parcel.readString() + hasUnseenStories = parcel.readBoolean() } @AbsModelType @@ -355,8 +355,8 @@ class User : Owner, Identificable { companion object { @JvmField val CREATOR: Parcelable.Creator = object : Parcelable.Creator { - override fun createFromParcel(`in`: Parcel): User { - return User(`in`) + override fun createFromParcel(parcel: Parcel): User { + return User(parcel) } override fun newArray(size: Int): Array { diff --git a/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/model/Video.kt b/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/model/Video.kt index 2e8cc6773..cb3db5fbe 100644 --- a/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/model/Video.kt +++ b/app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/model/Video.kt @@ -87,86 +87,86 @@ class Video : AbsModel, ParcelNative.ParcelableNative { private set constructor() - internal constructor(`in`: Parcel) { - id = `in`.readInt() - ownerId = `in`.readInt() - albumId = `in`.readInt() - title = `in`.readString() - description = `in`.readString() - link = `in`.readString() - date = `in`.readLong() - addingDate = `in`.readLong() - views = `in`.readInt() - player = `in`.readString() - image = `in`.readString() - accessKey = `in`.readString() - commentsCount = `in`.readInt() - isCanComment = `in`.getBoolean() - isCanRepost = `in`.getBoolean() - isUserLikes = `in`.getBoolean() - likesCount = `in`.readInt() - mp4link240 = `in`.readString() - mp4link360 = `in`.readString() - mp4link480 = `in`.readString() - mp4link720 = `in`.readString() - mp4link1080 = `in`.readString() - mp4link1440 = `in`.readString() - mp4link2160 = `in`.readString() - externalLink = `in`.readString() - hls = `in`.readString() - live = `in`.readString() - platform = `in`.readString() - isRepeat = `in`.getBoolean() - duration = `in`.readInt() - privacyView = `in`.readTypedObjectCompat(SimplePrivacy.CREATOR) - privacyComment = `in`.readTypedObjectCompat(SimplePrivacy.CREATOR) - isCanEdit = `in`.getBoolean() - isCanAdd = `in`.getBoolean() - private = `in`.getBoolean() - isFavorite = `in`.getBoolean() - msgId = `in`.readInt() - msgPeerId = `in`.readInt() - } - - internal constructor(`in`: ParcelNative) { - id = `in`.readInt() - ownerId = `in`.readInt() - albumId = `in`.readInt() - title = `in`.readString() - description = `in`.readString() - link = `in`.readString() - date = `in`.readLong() - addingDate = `in`.readLong() - views = `in`.readInt() - player = `in`.readString() - image = `in`.readString() - accessKey = `in`.readString() - commentsCount = `in`.readInt() - isCanComment = `in`.readBoolean() - isCanRepost = `in`.readBoolean() - isUserLikes = `in`.readBoolean() - likesCount = `in`.readInt() - mp4link240 = `in`.readString() - mp4link360 = `in`.readString() - mp4link480 = `in`.readString() - mp4link720 = `in`.readString() - mp4link1080 = `in`.readString() - mp4link1440 = `in`.readString() - mp4link2160 = `in`.readString() - externalLink = `in`.readString() - hls = `in`.readString() - live = `in`.readString() - platform = `in`.readString() - isRepeat = `in`.readBoolean() - duration = `in`.readInt() - privacyView = `in`.readParcelable(SimplePrivacy.NativeCreator) - privacyComment = `in`.readParcelable(SimplePrivacy.NativeCreator) - isCanEdit = `in`.readBoolean() - isCanAdd = `in`.readBoolean() - private = `in`.readBoolean() - isFavorite = `in`.readBoolean() - msgId = `in`.readInt() - msgPeerId = `in`.readInt() + internal constructor(parcel: Parcel) { + id = parcel.readInt() + ownerId = parcel.readInt() + albumId = parcel.readInt() + title = parcel.readString() + description = parcel.readString() + link = parcel.readString() + date = parcel.readLong() + addingDate = parcel.readLong() + views = parcel.readInt() + player = parcel.readString() + image = parcel.readString() + accessKey = parcel.readString() + commentsCount = parcel.readInt() + isCanComment = parcel.getBoolean() + isCanRepost = parcel.getBoolean() + isUserLikes = parcel.getBoolean() + likesCount = parcel.readInt() + mp4link240 = parcel.readString() + mp4link360 = parcel.readString() + mp4link480 = parcel.readString() + mp4link720 = parcel.readString() + mp4link1080 = parcel.readString() + mp4link1440 = parcel.readString() + mp4link2160 = parcel.readString() + externalLink = parcel.readString() + hls = parcel.readString() + live = parcel.readString() + platform = parcel.readString() + isRepeat = parcel.getBoolean() + duration = parcel.readInt() + privacyView = parcel.readTypedObjectCompat(SimplePrivacy.CREATOR) + privacyComment = parcel.readTypedObjectCompat(SimplePrivacy.CREATOR) + isCanEdit = parcel.getBoolean() + isCanAdd = parcel.getBoolean() + private = parcel.getBoolean() + isFavorite = parcel.getBoolean() + msgId = parcel.readInt() + msgPeerId = parcel.readInt() + } + + internal constructor(parcel: ParcelNative) { + id = parcel.readInt() + ownerId = parcel.readInt() + albumId = parcel.readInt() + title = parcel.readString() + description = parcel.readString() + link = parcel.readString() + date = parcel.readLong() + addingDate = parcel.readLong() + views = parcel.readInt() + player = parcel.readString() + image = parcel.readString() + accessKey = parcel.readString() + commentsCount = parcel.readInt() + isCanComment = parcel.readBoolean() + isCanRepost = parcel.readBoolean() + isUserLikes = parcel.readBoolean() + likesCount = parcel.readInt() + mp4link240 = parcel.readString() + mp4link360 = parcel.readString() + mp4link480 = parcel.readString() + mp4link720 = parcel.readString() + mp4link1080 = parcel.readString() + mp4link1440 = parcel.readString() + mp4link2160 = parcel.readString() + externalLink = parcel.readString() + hls = parcel.readString() + live = parcel.readString() + platform = parcel.readString() + isRepeat = parcel.readBoolean() + duration = parcel.readInt() + privacyView = parcel.readParcelable(SimplePrivacy.NativeCreator) + privacyComment = parcel.readParcelable(SimplePrivacy.NativeCreator) + isCanEdit = parcel.readBoolean() + isCanAdd = parcel.readBoolean() + private = parcel.readBoolean() + isFavorite = parcel.readBoolean() + msgId = parcel.readInt() + msgPeerId = parcel.readInt() } @AbsModelType @@ -453,8 +453,8 @@ class Video : AbsModel, ParcelNative.ParcelableNative { companion object { @JvmField val CREATOR: Parcelable.Creator