Skip to content

Commit

Permalink
8
Browse files Browse the repository at this point in the history
First Long
  • Loading branch information
umerov1999 committed Jan 16, 2023
1 parent 2f99cd9 commit 87297f9
Show file tree
Hide file tree
Showing 1,009 changed files with 5,756 additions and 5,223 deletions.
6 changes: 3 additions & 3 deletions app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/Constants.kt
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ object Constants {

val AUTH_VERSION = if (DEFAULT_ACCOUNT_TYPE == AccountType.KATE) API_VERSION else "5.122"
const val FILE_PROVIDER_AUTHORITY: String = BuildConfig.APPLICATION_ID + ".file_provider"
const val VK_ANDROID_APP_VERSION_NAME = "8.11"
const val VK_ANDROID_APP_VERSION_CODE = "15060"
const val VK_ANDROID_APP_VERSION_NAME = "8.12"
const val VK_ANDROID_APP_VERSION_CODE = "15090"
const val KATE_APP_VERSION_NAME = "96 lite"
const val KATE_APP_VERSION_CODE = "529"
const val API_ID: Int = BuildConfig.VK_API_APP_ID
Expand Down Expand Up @@ -167,4 +167,4 @@ object Constants {
Settings.get().accounts().getType(accountId)
)
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ class AttachmentsActivity : NoMainActivity(), PlaceProvider {
if (savedInstanceState == null) {
var fragment: Fragment? = null
val type = (intent.extras ?: return).getInt(Extra.TYPE)
val accountId = (intent.extras ?: return).getInt(Extra.ACCOUNT_ID)
val accountId = (intent.extras ?: return).getLong(Extra.ACCOUNT_ID)
when (type) {
AttachmentsTypes.DOC -> fragment =
DocsFragment.newInstance(accountId, accountId, DocsListPresenter.ACTION_SELECT)
Expand Down Expand Up @@ -54,7 +54,7 @@ class AttachmentsActivity : NoMainActivity(), PlaceProvider {

companion object {

fun createIntent(context: Context, accountId: Int, type: Int): Intent {
fun createIntent(context: Context, accountId: Long, type: Int): Intent {
return Intent(context, AttachmentsActivity::class.java)
.putExtra(Extra.TYPE, type)
.putExtra(Extra.ACCOUNT_ID, accountId)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,12 @@ class AudioSelectActivity : NoMainActivity(), PlaceProvider {
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
savedInstanceState ?: run {
val accountId = (intent.extras ?: return@run).getInt(Extra.ACCOUNT_ID)
val accountId = (intent.extras ?: return@run).getLong(Extra.ACCOUNT_ID)
attachInitialFragment(accountId)
}
}

private fun attachInitialFragment(accountId: Int) {
private fun attachInitialFragment(accountId: Long) {
val fragment = AudioSelectTabsFragment.newInstance(accountId)
supportFragmentManager
.beginTransaction()
Expand Down Expand Up @@ -57,7 +57,7 @@ class AudioSelectActivity : NoMainActivity(), PlaceProvider {
* @param accountId От чьего имени получать
*/

fun createIntent(context: Context, accountId: Int): Intent {
fun createIntent(context: Context, accountId: Long): Intent {
return Intent(context, AudioSelectActivity::class.java)
.putExtra(Extra.ACCOUNT_ID, accountId)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ class ChatActivity : NoMainActivity(), PlaceProvider, AppStyleable {
Place.CHAT -> {
val peer: Peer = args.getParcelableCompat(Extra.PEER) ?: return
val chatFragment =
newInstance(args.getInt(Extra.ACCOUNT_ID), args.getInt(Extra.OWNER_ID), peer)
newInstance(args.getLong(Extra.ACCOUNT_ID), args.getLong(Extra.OWNER_ID), peer)
attachToFront(chatFragment)
}
Place.VK_PHOTO_ALBUM_GALLERY, Place.FAVE_PHOTOS_GALLERY, Place.SIMPLE_PHOTO_GALLERY, Place.VK_PHOTO_TMP_SOURCE, Place.VK_PHOTO_ALBUM_GALLERY_SAVED, Place.VK_PHOTO_ALBUM_GALLERY_NATIVE -> newInstance(
Expand Down Expand Up @@ -108,7 +108,7 @@ class ChatActivity : NoMainActivity(), PlaceProvider, AppStyleable {
Place.DOC_PREVIEW -> {
val document: Document? = args.getParcelableCompat(Extra.DOC)
if (document != null && document.hasValidGifVideoLink()) {
val aid = args.getInt(Extra.ACCOUNT_ID)
val aid = args.getLong(Extra.ACCOUNT_ID)
val documents = ArrayList(listOf(document))
val extra = GifPagerActivity.buildArgs(aid, documents, 0)
place.launchActivityForResult(this, GifPagerActivity.newInstance(this, extra))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ class ChatActivityBubbles : NoMainActivity(), PlaceProvider, AppStyleable {
Place.CHAT -> {
val peer: Peer = args.getParcelableCompat(Extra.PEER) ?: return
val chatFragment =
newInstance(args.getInt(Extra.ACCOUNT_ID), args.getInt(Extra.OWNER_ID), peer)
newInstance(args.getLong(Extra.ACCOUNT_ID), args.getLong(Extra.OWNER_ID), peer)
attachToFront(chatFragment)
}
Place.VK_PHOTO_ALBUM_GALLERY, Place.FAVE_PHOTOS_GALLERY, Place.SIMPLE_PHOTO_GALLERY, Place.VK_PHOTO_TMP_SOURCE, Place.VK_PHOTO_ALBUM_GALLERY_SAVED, Place.VK_PHOTO_ALBUM_GALLERY_NATIVE -> newInstance(
Expand Down Expand Up @@ -118,7 +118,7 @@ class ChatActivityBubbles : NoMainActivity(), PlaceProvider, AppStyleable {
Place.DOC_PREVIEW -> {
val document: Document? = args.getParcelableCompat(Extra.DOC)
if (document != null && document.hasValidGifVideoLink()) {
val aid = args.getInt(Extra.ACCOUNT_ID)
val aid = args.getLong(Extra.ACCOUNT_ID)
val documents = ArrayList(listOf(document))
val extra = GifPagerActivity.buildArgs(aid, documents, 0)
place.launchActivityForResult(this, GifPagerActivity.newInstance(this, extra))
Expand Down Expand Up @@ -156,8 +156,8 @@ class ChatActivityBubbles : NoMainActivity(), PlaceProvider, AppStyleable {
val data = intent
if (data != null && data.extras != null) {
NotificationHelper.setBubbleOpened(
(data.extras ?: return).getInt(Extra.ACCOUNT_ID),
(data.extras ?: return).getInt(Extra.OWNER_ID)
(data.extras ?: return).getLong(Extra.ACCOUNT_ID),
(data.extras ?: return).getLong(Extra.OWNER_ID)
)
}
super.onResume()
Expand Down Expand Up @@ -210,7 +210,7 @@ class ChatActivityBubbles : NoMainActivity(), PlaceProvider, AppStyleable {
const val ACTION_OPEN_PLACE = "dev.ragnarok.fenrir.activity.ChatActivityBubbles.openPlace"


fun forStart(context: Context?, accountId: Int, peer: Peer): Intent {
fun forStart(context: Context?, accountId: Long, peer: Peer): Intent {
val intent = Intent(context, ChatActivityBubbles::class.java)
intent.action = ACTION_OPEN_PLACE
intent.putExtra(Extra.PLACE, PlaceFactory.getChatPlace(accountId, accountId, peer))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ class DeltaOwnerActivity : AppCompatActivity(), PlaceProvider, AppStyleable {
intent.extras?.getParcelableCompat(Extra.LIST) ?: DeltaOwner()
}

val accountId = intent.extras?.getInt(Extra.ACCOUNT_ID, Settings.get().accounts().current)
val accountId = intent.extras?.getLong(Extra.ACCOUNT_ID, Settings.get().accounts().current)
?: Settings.get().accounts().current

val Title: TextView = findViewById(R.id.delta_title)
Expand Down Expand Up @@ -213,7 +213,7 @@ class DeltaOwnerActivity : AppCompatActivity(), PlaceProvider, AppStyleable {
val ivRecycler: RecyclerView = view.findViewById(R.id.alert_recycle)
}

private inner class Adapter(val DeltaOwner: DeltaOwner, private val accountId: Int) :
private inner class Adapter(val DeltaOwner: DeltaOwner, private val accountId: Long) :
RecyclerView.Adapter<RecyclerViewHolder>() {
@SuppressLint("ClickableViewAccessibility")
override fun onCreateViewHolder(container: ViewGroup, viewType: Int): RecyclerViewHolder {
Expand Down Expand Up @@ -303,7 +303,7 @@ class DeltaOwnerActivity : AppCompatActivity(), PlaceProvider, AppStyleable {
}

companion object {
fun showDeltaActivity(context: Context, accountId: Int, delta: DeltaOwner) {
fun showDeltaActivity(context: Context, accountId: Long, delta: DeltaOwner) {
if (delta.content.isEmpty()) {
return
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,8 @@ class DualTabPhotoActivity : NoMainActivity(), PlaceProvider {
when (place.type) {
Place.VK_PHOTO_ALBUM -> {
val albumId = args.getInt(Extra.ALBUM_ID)
val accountId = args.getInt(Extra.ACCOUNT_ID)
val ownerId = args.getInt(Extra.OWNER_ID)
val accountId = args.getLong(Extra.ACCOUNT_ID)
val ownerId = args.getLong(Extra.OWNER_ID)
val fragment = VKPhotosFragment.newInstance(
accountId,
ownerId,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@ class KeyExchangeCommitActivity : AppCompatActivity() {
setTheme(theme)
super.onCreate(savedInstanceState)
setContentView(R.layout.activity_key_exchange_commit)
val accountId = (intent.extras ?: return).getInt(Extra.ACCOUNT_ID)
val peerId = (intent.extras ?: return).getInt(Extra.PEER_ID)
val accountId = (intent.extras ?: return).getLong(Extra.ACCOUNT_ID)
val peerId = (intent.extras ?: return).getLong(Extra.PEER_ID)
val user: User = intent.getParcelableExtraCompat(Extra.OWNER) ?: return
val messageId = (intent.extras ?: return).getInt(Extra.MESSAGE_ID)
val message: ExchangeMessage = intent.getParcelableExtraCompat(Extra.MESSAGE) ?: return
Expand Down Expand Up @@ -79,8 +79,8 @@ class KeyExchangeCommitActivity : AppCompatActivity() {

fun createIntent(
context: Context,
accountId: Int,
peerId: Int,
accountId: Long,
peerId: Long,
user: User,
messageId: Int,
message: ExchangeMessage
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ class LocalJsonToChatActivity : NoMainActivity(), PlaceProvider, AppStyleable {
Place.DOC_PREVIEW -> {
val document: Document? = args.getParcelableCompat(Extra.DOC)
if (document != null && document.hasValidGifVideoLink()) {
val aid = args.getInt(Extra.ACCOUNT_ID)
val aid = args.getLong(Extra.ACCOUNT_ID)
val documents = ArrayList(listOf(document))
val extra = GifPagerActivity.buildArgs(aid, documents, 0)
place.launchActivityForResult(this, GifPagerActivity.newInstance(this, extra))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -144,10 +144,10 @@ class LoginActivity : AppCompatActivity() {
context: Context?,
clientId: String?,
scope: String?,
groupIds: Collection<Int>?
groupIds: Collection<Long>?
): Intent {
val ids = Utils.join(groupIds, ",", object : Utils.SimpleFunction<Int, String> {
override fun apply(orig: Int): String {
val ids = Utils.join(groupIds, ",", object : Utils.SimpleFunction<Long, String> {
override fun apply(orig: Long): String {
return orig.toString()
}
})
Expand All @@ -170,7 +170,7 @@ class LoginActivity : AppCompatActivity() {
val groupid = matcher.group(1)
val token = matcher.group(2)
if (groupid.nonNullNoEmpty() && token.nonNullNoEmpty()) {
tokens.add(Token(-groupid.toInt(), token))
tokens.add(Token(-groupid.toLong(), token))
}
}
if (tokens.isEmpty()) {
Expand Down
Loading

0 comments on commit 87297f9

Please sign in to comment.