Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
A
apk
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Administrator
apk
Commits
2518d0e9
Commit
2518d0e9
authored
Mar 05, 2014
by
DrKLO
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Rename ApplicationActivity -> LaunchActivity
Don’t want to lose app shortcut (who knew about it)
parent
ba726700
Changes
24
Hide whitespace changes
Inline
Side-by-side
Showing
24 changed files
with
119 additions
and
119 deletions
+119
-119
AndroidManifest.xml
TMessagesProj/src/main/AndroidManifest.xml
+20
-20
MessagesController.java
.../main/java/org/telegram/messenger/MessagesController.java
+2
-2
ChatActivity.java
...sagesProj/src/main/java/org/telegram/ui/ChatActivity.java
+18
-18
ChatProfileActivity.java
...oj/src/main/java/org/telegram/ui/ChatProfileActivity.java
+7
-7
ChatProfileChangeNameActivity.java
...n/java/org/telegram/ui/ChatProfileChangeNameActivity.java
+1
-1
ContactAddActivity.java
...roj/src/main/java/org/telegram/ui/ContactAddActivity.java
+1
-1
ContactsActivity.java
...sProj/src/main/java/org/telegram/ui/ContactsActivity.java
+7
-7
DocumentSelectActivity.java
...src/main/java/org/telegram/ui/DocumentSelectActivity.java
+2
-2
GroupCreateActivity.java
...oj/src/main/java/org/telegram/ui/GroupCreateActivity.java
+3
-3
GroupCreateFinalActivity.java
...c/main/java/org/telegram/ui/GroupCreateFinalActivity.java
+3
-3
IdenticonActivity.java
...Proj/src/main/java/org/telegram/ui/IdenticonActivity.java
+2
-2
LaunchActivity.java
...gesProj/src/main/java/org/telegram/ui/LaunchActivity.java
+1
-1
LocationActivity.java
...sProj/src/main/java/org/telegram/ui/LocationActivity.java
+2
-2
LoginActivity.java
...agesProj/src/main/java/org/telegram/ui/LoginActivity.java
+1
-1
MediaActivity.java
...agesProj/src/main/java/org/telegram/ui/MediaActivity.java
+2
-2
MessagesActivity.java
...sProj/src/main/java/org/telegram/ui/MessagesActivity.java
+12
-12
PhotoCropActivity.java
...Proj/src/main/java/org/telegram/ui/PhotoCropActivity.java
+1
-1
SettingsActivity.java
...sProj/src/main/java/org/telegram/ui/SettingsActivity.java
+8
-8
SettingsBlockedUsers.java
...j/src/main/java/org/telegram/ui/SettingsBlockedUsers.java
+5
-5
SettingsNotificationsActivity.java
...n/java/org/telegram/ui/SettingsNotificationsActivity.java
+2
-2
SettingsWallpapersActivity.java
...main/java/org/telegram/ui/SettingsWallpapersActivity.java
+1
-1
UserProfileActivity.java
...oj/src/main/java/org/telegram/ui/UserProfileActivity.java
+12
-12
AvatarUpdater.java
...oj/src/main/java/org/telegram/ui/Views/AvatarUpdater.java
+3
-3
BaseFragment.java
...roj/src/main/java/org/telegram/ui/Views/BaseFragment.java
+3
-3
No files found.
TMessagesProj/src/main/AndroidManifest.xml
View file @
2518d0e9
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8"?>
<manifest
xmlns:android=
"http://schemas.android.com/apk/res/android"
<manifest
xmlns:android=
"http://schemas.android.com/apk/res/android"
package=
"org.telegram.messenger"
package=
"org.telegram.messenger"
android:versionCode=
"18
1
"
android:versionCode=
"18
2
"
android:versionName=
"1.3.26"
>
android:versionName=
"1.3.26"
>
<supports-screens
android:anyDensity=
"true"
<supports-screens
android:anyDensity=
"true"
...
@@ -71,25 +71,7 @@
...
@@ -71,25 +71,7 @@
<meta-data
android:name=
"com.google.android.gms.version"
android:value=
"@integer/google_play_services_version"
/>
<meta-data
android:name=
"com.google.android.gms.version"
android:value=
"@integer/google_play_services_version"
/>
<activity
<activity
android:name=
"org.telegram.ui.LoginActivity"
android:name=
"org.telegram.ui.LaunchActivity"
android:windowSoftInputMode=
"adjustResize"
android:configChanges=
"keyboard|keyboardHidden|orientation|screenSize"
android:screenOrientation=
"portrait"
>
</activity>
<activity
android:name=
"org.telegram.ui.CountrySelectActivity"
android:windowSoftInputMode=
"adjustResize"
android:theme=
"@style/Theme.TMessages"
android:configChanges=
"keyboard|keyboardHidden|orientation|screenSize"
android:screenOrientation=
"portrait"
>
</activity>
<activity
android:name=
"org.telegram.ui.IntroActivity"
android:configChanges=
"keyboard|keyboardHidden|orientation|screenSize"
android:screenOrientation=
"portrait"
>
</activity>
<activity
android:name=
"org.telegram.ui.ApplicationActivity"
android:windowSoftInputMode=
"adjustResize"
android:windowSoftInputMode=
"adjustResize"
android:hardwareAccelerated=
"true"
android:hardwareAccelerated=
"true"
android:launchMode=
"singleTask"
android:launchMode=
"singleTask"
...
@@ -134,6 +116,24 @@
...
@@ -134,6 +116,24 @@
<data
android:mimeType=
"vnd.android.cursor.item/vnd.org.telegram.messenger.android.profile"
/>
<data
android:mimeType=
"vnd.android.cursor.item/vnd.org.telegram.messenger.android.profile"
/>
</intent-filter>
</intent-filter>
</activity>
</activity>
<activity
android:name=
"org.telegram.ui.LoginActivity"
android:windowSoftInputMode=
"adjustResize"
android:configChanges=
"keyboard|keyboardHidden|orientation|screenSize"
android:screenOrientation=
"portrait"
>
</activity>
<activity
android:name=
"org.telegram.ui.CountrySelectActivity"
android:windowSoftInputMode=
"adjustResize"
android:theme=
"@style/Theme.TMessages"
android:configChanges=
"keyboard|keyboardHidden|orientation|screenSize"
android:screenOrientation=
"portrait"
>
</activity>
<activity
android:name=
"org.telegram.ui.IntroActivity"
android:configChanges=
"keyboard|keyboardHidden|orientation|screenSize"
android:screenOrientation=
"portrait"
>
</activity>
<activity
<activity
android:name=
"org.telegram.ui.GalleryImageViewer"
android:name=
"org.telegram.ui.GalleryImageViewer"
android:theme=
"@style/Theme.TMessages.Gallery"
android:theme=
"@style/Theme.TMessages.Gallery"
...
...
TMessagesProj/src/main/java/org/telegram/messenger/MessagesController.java
View file @
2518d0e9
...
@@ -34,7 +34,7 @@ import android.util.SparseArray;
...
@@ -34,7 +34,7 @@ import android.util.SparseArray;
import
org.telegram.objects.MessageObject
;
import
org.telegram.objects.MessageObject
;
import
org.telegram.objects.PhotoObject
;
import
org.telegram.objects.PhotoObject
;
import
org.telegram.ui.
Application
Activity
;
import
org.telegram.ui.
Launch
Activity
;
import
org.telegram.ui.ApplicationLoader
;
import
org.telegram.ui.ApplicationLoader
;
import
java.io.File
;
import
java.io.File
;
...
@@ -4188,7 +4188,7 @@ public class MessagesController implements NotificationCenter.NotificationCenter
...
@@ -4188,7 +4188,7 @@ public class MessagesController implements NotificationCenter.NotificationCenter
String
chatSoundPath
=
null
;
String
chatSoundPath
=
null
;
NotificationManager
mNotificationManager
=
(
NotificationManager
)
ApplicationLoader
.
applicationContext
.
getSystemService
(
Context
.
NOTIFICATION_SERVICE
);
NotificationManager
mNotificationManager
=
(
NotificationManager
)
ApplicationLoader
.
applicationContext
.
getSystemService
(
Context
.
NOTIFICATION_SERVICE
);
Intent
intent
=
new
Intent
(
ApplicationLoader
.
applicationContext
,
Application
Activity
.
class
);
Intent
intent
=
new
Intent
(
ApplicationLoader
.
applicationContext
,
Launch
Activity
.
class
);
String
msg
=
null
;
String
msg
=
null
;
if
((
int
)
dialog_id
!=
0
)
{
if
((
int
)
dialog_id
!=
0
)
{
...
...
TMessagesProj/src/main/java/org/telegram/ui/ChatActivity.java
View file @
2518d0e9
...
@@ -242,7 +242,7 @@ public class ChatActivity extends BaseFragment implements SizeNotifierRelativeLa
...
@@ -242,7 +242,7 @@ public class ChatActivity extends BaseFragment implements SizeNotifierRelativeLa
args
.
putBoolean
(
"serverOnly"
,
true
);
args
.
putBoolean
(
"serverOnly"
,
true
);
fragment
.
setArguments
(
args
);
fragment
.
setArguments
(
args
);
fragment
.
delegate
=
ChatActivity
.
this
;
fragment
.
delegate
=
ChatActivity
.
this
;
((
Application
Activity
)
parentActivity
).
presentFragment
(
fragment
,
"select_chat"
,
false
);
((
Launch
Activity
)
parentActivity
).
presentFragment
(
fragment
,
"select_chat"
,
false
);
break
;
break
;
}
}
}
}
...
@@ -2056,7 +2056,7 @@ public class ChatActivity extends BaseFragment implements SizeNotifierRelativeLa
...
@@ -2056,7 +2056,7 @@ public class ChatActivity extends BaseFragment implements SizeNotifierRelativeLa
Bundle
args
=
new
Bundle
();
Bundle
args
=
new
Bundle
();
args
.
putInt
(
"user_id"
,
currentUser
.
id
);
args
.
putInt
(
"user_id"
,
currentUser
.
id
);
fragment
.
setArguments
(
args
);
fragment
.
setArguments
(
args
);
((
Application
Activity
)
parentActivity
).
presentFragment
(
fragment
,
"add_contact_"
+
currentUser
.
id
,
false
);
((
Launch
Activity
)
parentActivity
).
presentFragment
(
fragment
,
"add_contact_"
+
currentUser
.
id
,
false
);
}
}
});
});
}
}
...
@@ -2175,7 +2175,7 @@ public class ChatActivity extends BaseFragment implements SizeNotifierRelativeLa
...
@@ -2175,7 +2175,7 @@ public class ChatActivity extends BaseFragment implements SizeNotifierRelativeLa
actionBar
.
setDisplayShowCustomEnabled
(
false
);
actionBar
.
setDisplayShowCustomEnabled
(
false
);
actionBar
.
setCustomView
(
null
);
actionBar
.
setCustomView
(
null
);
updateSubtitle
();
updateSubtitle
();
((
Application
Activity
)
parentActivity
).
fixBackButton
();
((
Launch
Activity
)
parentActivity
).
fixBackButton
();
}
}
@Override
@Override
...
@@ -2214,8 +2214,8 @@ public class ChatActivity extends BaseFragment implements SizeNotifierRelativeLa
...
@@ -2214,8 +2214,8 @@ public class ChatActivity extends BaseFragment implements SizeNotifierRelativeLa
if
(
getActivity
()
==
null
)
{
if
(
getActivity
()
==
null
)
{
return
;
return
;
}
}
((
Application
Activity
)
parentActivity
).
showActionBar
();
((
Launch
Activity
)
parentActivity
).
showActionBar
();
((
Application
Activity
)
parentActivity
).
updateActionBar
();
((
Launch
Activity
)
parentActivity
).
updateActionBar
();
fixLayout
();
fixLayout
();
SharedPreferences
preferences
=
ApplicationLoader
.
applicationContext
.
getSharedPreferences
(
"mainconfig"
,
Activity
.
MODE_PRIVATE
);
SharedPreferences
preferences
=
ApplicationLoader
.
applicationContext
.
getSharedPreferences
(
"mainconfig"
,
Activity
.
MODE_PRIVATE
);
String
lastMessageText
=
preferences
.
getString
(
"dialog_"
+
dialog_id
,
null
);
String
lastMessageText
=
preferences
.
getString
(
"dialog_"
+
dialog_id
,
null
);
...
@@ -2380,7 +2380,7 @@ public class ChatActivity extends BaseFragment implements SizeNotifierRelativeLa
...
@@ -2380,7 +2380,7 @@ public class ChatActivity extends BaseFragment implements SizeNotifierRelativeLa
args
.
putLong
(
"dialog_id"
,
dialog_id
);
args
.
putLong
(
"dialog_id"
,
dialog_id
);
}
}
fragment
.
setArguments
(
args
);
fragment
.
setArguments
(
args
);
((
Application
Activity
)
parentActivity
).
presentFragment
(
fragment
,
"user_"
+
currentUser
.
id
,
swipeOpening
);
((
Launch
Activity
)
parentActivity
).
presentFragment
(
fragment
,
"user_"
+
currentUser
.
id
,
swipeOpening
);
}
else
if
(
currentChat
!=
null
)
{
}
else
if
(
currentChat
!=
null
)
{
if
(
info
!=
null
)
{
if
(
info
!=
null
)
{
if
(
info
instanceof
TLRPC
.
TL_chatParticipantsForbidden
)
{
if
(
info
instanceof
TLRPC
.
TL_chatParticipantsForbidden
)
{
...
@@ -2395,7 +2395,7 @@ public class ChatActivity extends BaseFragment implements SizeNotifierRelativeLa
...
@@ -2395,7 +2395,7 @@ public class ChatActivity extends BaseFragment implements SizeNotifierRelativeLa
Bundle
args
=
new
Bundle
();
Bundle
args
=
new
Bundle
();
args
.
putInt
(
"chat_id"
,
currentChat
.
id
);
args
.
putInt
(
"chat_id"
,
currentChat
.
id
);
fragment
.
setArguments
(
args
);
fragment
.
setArguments
(
args
);
((
Application
Activity
)
parentActivity
).
presentFragment
(
fragment
,
"chat_"
+
currentChat
.
id
,
swipeOpening
);
((
Launch
Activity
)
parentActivity
).
presentFragment
(
fragment
,
"chat_"
+
currentChat
.
id
,
swipeOpening
);
}
}
}
}
});
});
...
@@ -2614,7 +2614,7 @@ public class ChatActivity extends BaseFragment implements SizeNotifierRelativeLa
...
@@ -2614,7 +2614,7 @@ public class ChatActivity extends BaseFragment implements SizeNotifierRelativeLa
args
.
putBoolean
(
"serverOnly"
,
true
);
args
.
putBoolean
(
"serverOnly"
,
true
);
fragment
.
setArguments
(
args
);
fragment
.
setArguments
(
args
);
fragment
.
delegate
=
this
;
fragment
.
delegate
=
this
;
((
Application
Activity
)
parentActivity
).
presentFragment
(
fragment
,
"select_chat"
,
false
);
((
Launch
Activity
)
parentActivity
).
presentFragment
(
fragment
,
"select_chat"
,
false
);
}
}
}
else
if
(
option
==
3
)
{
}
else
if
(
option
==
3
)
{
if
(
selectedObject
!=
null
)
{
if
(
selectedObject
!=
null
)
{
...
@@ -2677,14 +2677,14 @@ public class ChatActivity extends BaseFragment implements SizeNotifierRelativeLa
...
@@ -2677,14 +2677,14 @@ public class ChatActivity extends BaseFragment implements SizeNotifierRelativeLa
fragment
.
scrollToTopOnResume
=
true
;
fragment
.
scrollToTopOnResume
=
true
;
ActionBarActivity
act
=
(
ActionBarActivity
)
getActivity
();
ActionBarActivity
act
=
(
ActionBarActivity
)
getActivity
();
if
(
inflaterActivity
!=
null
)
{
if
(
inflaterActivity
!=
null
)
{
((
Application
Activity
)
inflaterActivity
).
presentFragment
(
fragment
,
"chat"
+
Math
.
random
(),
false
);
((
Launch
Activity
)
inflaterActivity
).
presentFragment
(
fragment
,
"chat"
+
Math
.
random
(),
false
);
}
}
}
else
if
(
lower_part
<
0
)
{
}
else
if
(
lower_part
<
0
)
{
bundle
.
putInt
(
"chat_id"
,
-
lower_part
);
bundle
.
putInt
(
"chat_id"
,
-
lower_part
);
fragment
.
setArguments
(
bundle
);
fragment
.
setArguments
(
bundle
);
fragment
.
scrollToTopOnResume
=
true
;
fragment
.
scrollToTopOnResume
=
true
;
if
(
inflaterActivity
!=
null
)
{
if
(
inflaterActivity
!=
null
)
{
((
Application
Activity
)
inflaterActivity
).
presentFragment
(
fragment
,
"chat"
+
Math
.
random
(),
false
);
((
Launch
Activity
)
inflaterActivity
).
presentFragment
(
fragment
,
"chat"
+
Math
.
random
(),
false
);
}
}
}
}
removeSelfFromStack
();
removeSelfFromStack
();
...
@@ -2800,13 +2800,13 @@ public class ChatActivity extends BaseFragment implements SizeNotifierRelativeLa
...
@@ -2800,13 +2800,13 @@ public class ChatActivity extends BaseFragment implements SizeNotifierRelativeLa
return
true
;
return
true
;
}
}
LocationActivity
fragment
=
new
LocationActivity
();
LocationActivity
fragment
=
new
LocationActivity
();
((
Application
Activity
)
parentActivity
).
presentFragment
(
fragment
,
"location"
,
false
);
((
Launch
Activity
)
parentActivity
).
presentFragment
(
fragment
,
"location"
,
false
);
break
;
break
;
}
}
case
R
.
id
.
attach_document
:
{
case
R
.
id
.
attach_document
:
{
DocumentSelectActivity
fragment
=
new
DocumentSelectActivity
();
DocumentSelectActivity
fragment
=
new
DocumentSelectActivity
();
fragment
.
delegate
=
this
;
fragment
.
delegate
=
this
;
((
Application
Activity
)
parentActivity
).
presentFragment
(
fragment
,
"document"
,
false
);
((
Launch
Activity
)
parentActivity
).
presentFragment
(
fragment
,
"document"
,
false
);
break
;
break
;
}
}
}
}
...
@@ -3097,7 +3097,7 @@ public class ChatActivity extends BaseFragment implements SizeNotifierRelativeLa
...
@@ -3097,7 +3097,7 @@ public class ChatActivity extends BaseFragment implements SizeNotifierRelativeLa
Bundle
args
=
new
Bundle
();
Bundle
args
=
new
Bundle
();
args
.
putInt
(
"user_id"
,
user
.
id
);
args
.
putInt
(
"user_id"
,
user
.
id
);
fragment
.
setArguments
(
args
);
fragment
.
setArguments
(
args
);
((
Application
Activity
)
parentActivity
).
presentFragment
(
fragment
,
"user_"
+
user
.
id
,
false
);
((
Launch
Activity
)
parentActivity
).
presentFragment
(
fragment
,
"user_"
+
user
.
id
,
false
);
}
}
}
}
};
};
...
@@ -3699,7 +3699,7 @@ public class ChatActivity extends BaseFragment implements SizeNotifierRelativeLa
...
@@ -3699,7 +3699,7 @@ public class ChatActivity extends BaseFragment implements SizeNotifierRelativeLa
args
.
putInt
(
"user_id"
,
message
.
messageOwner
.
media
.
user_id
);
args
.
putInt
(
"user_id"
,
message
.
messageOwner
.
media
.
user_id
);
args
.
putString
(
"phone"
,
message
.
messageOwner
.
media
.
phone_number
);
args
.
putString
(
"phone"
,
message
.
messageOwner
.
media
.
phone_number
);
fragment
.
setArguments
(
args
);
fragment
.
setArguments
(
args
);
((
Application
Activity
)
parentActivity
).
presentFragment
(
fragment
,
"add_contact_"
+
message
.
messageOwner
.
media
.
user_id
,
false
);
((
Launch
Activity
)
parentActivity
).
presentFragment
(
fragment
,
"add_contact_"
+
message
.
messageOwner
.
media
.
user_id
,
false
);
}
}
});
});
...
@@ -3728,7 +3728,7 @@ public class ChatActivity extends BaseFragment implements SizeNotifierRelativeLa
...
@@ -3728,7 +3728,7 @@ public class ChatActivity extends BaseFragment implements SizeNotifierRelativeLa
Bundle
args
=
new
Bundle
();
Bundle
args
=
new
Bundle
();
args
.
putInt
(
"user_id"
,
message
.
messageOwner
.
media
.
user_id
);
args
.
putInt
(
"user_id"
,
message
.
messageOwner
.
media
.
user_id
);
fragment
.
setArguments
(
args
);
fragment
.
setArguments
(
args
);
((
Application
Activity
)
parentActivity
).
presentFragment
(
fragment
,
"user_"
+
message
.
messageOwner
.
media
.
user_id
,
false
);
((
Launch
Activity
)
parentActivity
).
presentFragment
(
fragment
,
"user_"
+
message
.
messageOwner
.
media
.
user_id
,
false
);
}
}
}
}
}
}
...
@@ -3753,7 +3753,7 @@ public class ChatActivity extends BaseFragment implements SizeNotifierRelativeLa
...
@@ -3753,7 +3753,7 @@ public class ChatActivity extends BaseFragment implements SizeNotifierRelativeLa
Bundle
args
=
new
Bundle
();
Bundle
args
=
new
Bundle
();
args
.
putInt
(
"user_id"
,
message
.
messageOwner
.
media
.
audio
.
user_id
);
args
.
putInt
(
"user_id"
,
message
.
messageOwner
.
media
.
audio
.
user_id
);
fragment
.
setArguments
(
args
);
fragment
.
setArguments
(
args
);
((
Application
Activity
)
parentActivity
).
presentFragment
(
fragment
,
"user_"
+
message
.
messageOwner
.
media
.
audio
.
user_id
,
false
);
((
Launch
Activity
)
parentActivity
).
presentFragment
(
fragment
,
"user_"
+
message
.
messageOwner
.
media
.
audio
.
user_id
,
false
);
}
}
}
}
}
}
...
@@ -3782,7 +3782,7 @@ public class ChatActivity extends BaseFragment implements SizeNotifierRelativeLa
...
@@ -3782,7 +3782,7 @@ public class ChatActivity extends BaseFragment implements SizeNotifierRelativeLa
Bundle
args
=
new
Bundle
();
Bundle
args
=
new
Bundle
();
args
.
putInt
(
"user_id"
,
message
.
messageOwner
.
from_id
);
args
.
putInt
(
"user_id"
,
message
.
messageOwner
.
from_id
);
fragment
.
setArguments
(
args
);
fragment
.
setArguments
(
args
);
((
Application
Activity
)
parentActivity
).
presentFragment
(
fragment
,
"user_"
+
message
.
messageOwner
.
from_id
,
false
);
((
Launch
Activity
)
parentActivity
).
presentFragment
(
fragment
,
"user_"
+
message
.
messageOwner
.
from_id
,
false
);
}
}
}
}
});
});
...
@@ -3883,7 +3883,7 @@ public class ChatActivity extends BaseFragment implements SizeNotifierRelativeLa
...
@@ -3883,7 +3883,7 @@ public class ChatActivity extends BaseFragment implements SizeNotifierRelativeLa
}
}
NotificationCenter
.
Instance
.
addToMemCache
(
0
,
message
);
NotificationCenter
.
Instance
.
addToMemCache
(
0
,
message
);
LocationActivity
fragment
=
new
LocationActivity
();
LocationActivity
fragment
=
new
LocationActivity
();
((
Application
Activity
)
parentActivity
).
presentFragment
(
fragment
,
"location_view"
,
false
);
((
Launch
Activity
)
parentActivity
).
presentFragment
(
fragment
,
"location_view"
,
false
);
}
else
if
(
message
.
type
==
2
||
message
.
type
==
3
)
{
}
else
if
(
message
.
type
==
2
||
message
.
type
==
3
)
{
if
(
photoFile
==
null
||
photoObjectToSet
==
null
||
photoFile
!=
null
&&
photoFile
.
exists
())
{
if
(
photoFile
==
null
||
photoObjectToSet
==
null
||
photoFile
!=
null
&&
photoFile
.
exists
())
{
NotificationCenter
.
Instance
.
addToMemCache
(
51
,
message
);
NotificationCenter
.
Instance
.
addToMemCache
(
51
,
message
);
...
...
TMessagesProj/src/main/java/org/telegram/ui/ChatProfileActivity.java
View file @
2518d0e9
...
@@ -194,7 +194,7 @@ public class ChatProfileActivity extends BaseFragment implements NotificationCen
...
@@ -194,7 +194,7 @@ public class ChatProfileActivity extends BaseFragment implements NotificationCen
Bundle
bundle
=
new
Bundle
();
Bundle
bundle
=
new
Bundle
();
bundle
.
putLong
(
"dialog_id"
,
-
chat_id
);
bundle
.
putLong
(
"dialog_id"
,
-
chat_id
);
fragment
.
setArguments
(
bundle
);
fragment
.
setArguments
(
bundle
);
((
Application
Activity
)
parentActivity
).
presentFragment
(
fragment
,
"media_chat_"
+
chat_id
,
false
);
((
Launch
Activity
)
parentActivity
).
presentFragment
(
fragment
,
"media_chat_"
+
chat_id
,
false
);
}
else
{
}
else
{
int
size
=
0
;
int
size
=
0
;
if
(
info
!=
null
)
{
if
(
info
!=
null
)
{
...
@@ -209,7 +209,7 @@ public class ChatProfileActivity extends BaseFragment implements NotificationCen
...
@@ -209,7 +209,7 @@ public class ChatProfileActivity extends BaseFragment implements NotificationCen
Bundle
args
=
new
Bundle
();
Bundle
args
=
new
Bundle
();
args
.
putInt
(
"user_id"
,
user_id
);
args
.
putInt
(
"user_id"
,
user_id
);
fragment
.
setArguments
(
args
);
fragment
.
setArguments
(
args
);
((
Application
Activity
)
parentActivity
).
presentFragment
(
fragment
,
"user_"
+
user_id
,
false
);
((
Launch
Activity
)
parentActivity
).
presentFragment
(
fragment
,
"user_"
+
user_id
,
false
);
}
else
{
}
else
{
if
(
size
+
7
==
i
)
{
if
(
size
+
7
==
i
)
{
if
(
info
.
participants
.
size
()
<
200
)
{
if
(
info
.
participants
.
size
()
<
200
)
{
...
@@ -332,7 +332,7 @@ public class ChatProfileActivity extends BaseFragment implements NotificationCen
...
@@ -332,7 +332,7 @@ public class ChatProfileActivity extends BaseFragment implements NotificationCen
title
.
setCompoundDrawablesWithIntrinsicBounds
(
0
,
0
,
0
,
0
);
title
.
setCompoundDrawablesWithIntrinsicBounds
(
0
,
0
,
0
,
0
);
title
.
setCompoundDrawablePadding
(
0
);
title
.
setCompoundDrawablePadding
(
0
);
}
}
((
Application
Activity
)
parentActivity
).
fixBackButton
();
((
Launch
Activity
)
parentActivity
).
fixBackButton
();
}
}
@Override
@Override
...
@@ -344,8 +344,8 @@ public class ChatProfileActivity extends BaseFragment implements NotificationCen
...
@@ -344,8 +344,8 @@ public class ChatProfileActivity extends BaseFragment implements NotificationCen
if
(
listViewAdapter
!=
null
)
{
if
(
listViewAdapter
!=
null
)
{
listViewAdapter
.
notifyDataSetChanged
();
listViewAdapter
.
notifyDataSetChanged
();
}
}
((
Application
Activity
)
parentActivity
).
showActionBar
();
((
Launch
Activity
)
parentActivity
).
showActionBar
();
((
Application
Activity
)
parentActivity
).
updateActionBar
();
((
Launch
Activity
)
parentActivity
).
updateActionBar
();
}
}
@Override
@Override
...
@@ -457,7 +457,7 @@ public class ChatProfileActivity extends BaseFragment implements NotificationCen
...
@@ -457,7 +457,7 @@ public class ChatProfileActivity extends BaseFragment implements NotificationCen
NotificationCenter
.
Instance
.
addToMemCache
(
7
,
users
);
NotificationCenter
.
Instance
.
addToMemCache
(
7
,
users
);
}
}
fragment
.
setArguments
(
bundle
);
fragment
.
setArguments
(
bundle
);
((
Application
Activity
)
parentActivity
).
presentFragment
(
fragment
,
"contacts_block"
,
false
);
((
Launch
Activity
)
parentActivity
).
presentFragment
(
fragment
,
"contacts_block"
,
false
);
}
}
private
void
kickUser
(
TLRPC
.
TL_chatParticipant
user
)
{
private
void
kickUser
(
TLRPC
.
TL_chatParticipant
user
)
{
...
@@ -549,7 +549,7 @@ public class ChatProfileActivity extends BaseFragment implements NotificationCen
...
@@ -549,7 +549,7 @@ public class ChatProfileActivity extends BaseFragment implements NotificationCen
Bundle
bundle
=
new
Bundle
();
Bundle
bundle
=
new
Bundle
();
bundle
.
putInt
(
"chat_id"
,
chat_id
);
bundle
.
putInt
(
"chat_id"
,
chat_id
);
fragment
.
setArguments
(
bundle
);
fragment
.
setArguments
(
bundle
);
((
Application
Activity
)
parentActivity
).
presentFragment
(
fragment
,
"chat_name_"
+
chat_id
,
false
);
((
Launch
Activity
)
parentActivity
).
presentFragment
(
fragment
,
"chat_name_"
+
chat_id
,
false
);
}
}
});
});
...
...
TMessagesProj/src/main/java/org/telegram/ui/ChatProfileChangeNameActivity.java
View file @
2518d0e9
...
@@ -129,7 +129,7 @@ public class ChatProfileChangeNameActivity extends BaseFragment {
...
@@ -129,7 +129,7 @@ public class ChatProfileChangeNameActivity extends BaseFragment {
if
(
getActivity
()
==
null
)
{
if
(
getActivity
()
==
null
)
{
return
;
return
;
}
}
((
Application
Activity
)
parentActivity
).
updateActionBar
();
((
Launch
Activity
)
parentActivity
).
updateActionBar
();
SharedPreferences
preferences
=
ApplicationLoader
.
applicationContext
.
getSharedPreferences
(
"mainconfig"
,
Activity
.
MODE_PRIVATE
);
SharedPreferences
preferences
=
ApplicationLoader
.
applicationContext
.
getSharedPreferences
(
"mainconfig"
,
Activity
.
MODE_PRIVATE
);
boolean
animations
=
preferences
.
getBoolean
(
"view_animations"
,
true
);
boolean
animations
=
preferences
.
getBoolean
(
"view_animations"
,
true
);
...
...
TMessagesProj/src/main/java/org/telegram/ui/ContactAddActivity.java
View file @
2518d0e9
...
@@ -214,7 +214,7 @@ public class ContactAddActivity extends BaseFragment implements NotificationCent
...
@@ -214,7 +214,7 @@ public class ContactAddActivity extends BaseFragment implements NotificationCent
if
(
getActivity
()
==
null
)
{
if
(
getActivity
()
==
null
)
{
return
;
return
;
}
}
((
Application
Activity
)
parentActivity
).
updateActionBar
();
((
Launch
Activity
)
parentActivity
).
updateActionBar
();
SharedPreferences
preferences
=
ApplicationLoader
.
applicationContext
.
getSharedPreferences
(
"mainconfig"
,
Activity
.
MODE_PRIVATE
);
SharedPreferences
preferences
=
ApplicationLoader
.
applicationContext
.
getSharedPreferences
(
"mainconfig"
,
Activity
.
MODE_PRIVATE
);
boolean
animations
=
preferences
.
getBoolean
(
"view_animations"
,
true
);
boolean
animations
=
preferences
.
getBoolean
(
"view_animations"
,
true
);
...
...
TMessagesProj/src/main/java/org/telegram/ui/ContactsActivity.java
View file @
2518d0e9
...
@@ -174,7 +174,7 @@ public class ContactsActivity extends BaseFragment implements NotificationCenter
...
@@ -174,7 +174,7 @@ public class ContactsActivity extends BaseFragment implements NotificationCenter
Bundle
bundle
=
new
Bundle
();
Bundle
bundle
=
new
Bundle
();
bundle
.
putInt
(
"user_id"
,
user
.
id
);
bundle
.
putInt
(
"user_id"
,
user
.
id
);
fragment
.
setArguments
(
bundle
);
fragment
.
setArguments
(
bundle
);
((
Application
Activity
)
parentActivity
).
presentFragment
(
fragment
,
"chat"
+
Math
.
random
(),
destroyAfterSelect
,
false
);
((
Launch
Activity
)
parentActivity
).
presentFragment
(
fragment
,
"chat"
+
Math
.
random
(),
destroyAfterSelect
,
false
);
}
}
}
}
}
else
{
}
else
{
...
@@ -235,7 +235,7 @@ public class ContactsActivity extends BaseFragment implements NotificationCenter
...
@@ -235,7 +235,7 @@ public class ContactsActivity extends BaseFragment implements NotificationCenter
Bundle
bundle
=
new
Bundle
();
Bundle
bundle
=
new
Bundle
();
bundle
.
putInt
(
"user_id"
,
user
.
id
);
bundle
.
putInt
(
"user_id"
,
user
.
id
);
fragment
.
setArguments
(
bundle
);
fragment
.
setArguments
(
bundle
);
((
Application
Activity
)
parentActivity
).
presentFragment
(
fragment
,
"chat"
+
Math
.
random
(),
destroyAfterSelect
,
false
);
((
Launch
Activity
)
parentActivity
).
presentFragment
(
fragment
,
"chat"
+
Math
.
random
(),
destroyAfterSelect
,
false
);
}
}
}
}
}
else
{
}
else
{
...
@@ -357,7 +357,7 @@ public class ContactsActivity extends BaseFragment implements NotificationCenter
...
@@ -357,7 +357,7 @@ public class ContactsActivity extends BaseFragment implements NotificationCenter
actionBar
.
setTitle
(
getStringEntry
(
R
.
string
.
Contacts
));
actionBar
.
setTitle
(
getStringEntry
(
R
.
string
.
Contacts
));
}
}
((
Application
Activity
)
parentActivity
).
fixBackButton
();
((
Launch
Activity
)
parentActivity
).
fixBackButton
();
}
}
@Override
@Override
...
@@ -373,8 +373,8 @@ public class ContactsActivity extends BaseFragment implements NotificationCenter
...
@@ -373,8 +373,8 @@ public class ContactsActivity extends BaseFragment implements NotificationCenter
listViewAdapter
.
notifyDataSetChanged
();
listViewAdapter
.
notifyDataSetChanged
();
}
}
firstStart
=
false
;
firstStart
=
false
;
((
Application
Activity
)
parentActivity
).
showActionBar
();
((
Launch
Activity
)
parentActivity
).
showActionBar
();
((
Application
Activity
)
parentActivity
).
updateActionBar
();
((
Launch
Activity
)
parentActivity
).
updateActionBar
();
}
}
@Override
@Override
...
@@ -478,7 +478,7 @@ public class ContactsActivity extends BaseFragment implements NotificationCenter
...
@@ -478,7 +478,7 @@ public class ContactsActivity extends BaseFragment implements NotificationCenter
}
}
listView
.
setFastScrollEnabled
(
true
);
listView
.
setFastScrollEnabled
(
true
);
listView
.
setVerticalScrollBarEnabled
(
false
);
listView
.
setVerticalScrollBarEnabled
(
false
);
((
Application
Activity
)
parentActivity
).
updateActionBar
();
((
Launch
Activity
)
parentActivity
).
updateActionBar
();
epmtyTextView
.
setText
(
getStringEntry
(
R
.
string
.
NoContacts
));
epmtyTextView
.
setText
(
getStringEntry
(
R
.
string
.
NoContacts
));
return
true
;
return
true
;
...
@@ -504,7 +504,7 @@ public class ContactsActivity extends BaseFragment implements NotificationCenter
...
@@ -504,7 +504,7 @@ public class ContactsActivity extends BaseFragment implements NotificationCenter
Bundle
bundle
=
new
Bundle
();
Bundle
bundle
=
new
Bundle
();
bundle
.
putInt
(
"enc_id"
,
encryptedChat
.
id
);
bundle
.
putInt
(
"enc_id"
,
encryptedChat
.
id
);
fragment
.
setArguments
(
bundle
);
fragment
.
setArguments
(
bundle
);
((
Application
Activity
)
parentActivity
).
presentFragment
(
fragment
,
"chat"
+
Math
.
random
(),
true
,
false
);
((
Launch
Activity
)
parentActivity
).
presentFragment
(
fragment
,
"chat"
+
Math
.
random
(),
true
,
false
);
}
}
}
}
}
}
...
...
TMessagesProj/src/main/java/org/telegram/ui/DocumentSelectActivity.java
View file @
2518d0e9
...
@@ -240,8 +240,8 @@ public class DocumentSelectActivity extends BaseFragment {
...
@@ -240,8 +240,8 @@ public class DocumentSelectActivity extends BaseFragment {
listAdapter
.
notifyDataSetChanged
();
listAdapter
.
notifyDataSetChanged
();
}
}
firstStart
=
false
;
firstStart
=
false
;
((
Application
Activity
)
parentActivity
).
showActionBar
();
((
Launch
Activity
)
parentActivity
).
showActionBar
();
((
Application
Activity
)
parentActivity
).
updateActionBar
();
((
Launch
Activity
)
parentActivity
).
updateActionBar
();
}
}
@Override
@Override
...
...
TMessagesProj/src/main/java/org/telegram/ui/GroupCreateActivity.java
View file @
2518d0e9
...
@@ -294,8 +294,8 @@ public class GroupCreateActivity extends BaseFragment implements NotificationCen
...
@@ -294,8 +294,8 @@ public class GroupCreateActivity extends BaseFragment implements NotificationCen
if
(
getActivity
()
==
null
)
{
if
(
getActivity
()
==
null
)
{
return
;
return
;
}
}
((
Application
Activity
)
parentActivity
).
showActionBar
();
((
Launch
Activity
)
parentActivity
).
showActionBar
();
((
Application
Activity
)
parentActivity
).
updateActionBar
();
((
Launch
Activity
)
parentActivity
).
updateActionBar
();
}
}
public
Emoji
.
XImageSpan
createAndPutChipForUser
(
TLRPC
.
User
user
)
{
public
Emoji
.
XImageSpan
createAndPutChipForUser
(
TLRPC
.
User
user
)
{
...
@@ -426,7 +426,7 @@ public class GroupCreateActivity extends BaseFragment implements NotificationCen
...
@@ -426,7 +426,7 @@ public class GroupCreateActivity extends BaseFragment implements NotificationCen
}
else
{
}
else
{
return
;
return
;
}
}
((
Application
Activity
)
parentActivity
).
presentFragment
(
new
GroupCreateFinalActivity
(),
"group_craate_final"
,
false
);
((
Launch
Activity
)
parentActivity
).
presentFragment
(
new
GroupCreateFinalActivity
(),
"group_craate_final"
,
false
);
}
}
});
});
}
}
...
...
TMessagesProj/src/main/java/org/telegram/ui/GroupCreateFinalActivity.java
View file @
2518d0e9
...
@@ -162,8 +162,8 @@ public class GroupCreateFinalActivity extends BaseFragment implements Notificati
...
@@ -162,8 +162,8 @@ public class GroupCreateFinalActivity extends BaseFragment implements Notificati
if
(
getActivity
()
==
null
)
{
if
(
getActivity
()
==
null
)
{
return
;
return
;
}
}
((
Application
Activity
)
parentActivity
).
showActionBar
();
((
Launch
Activity
)
parentActivity
).
showActionBar
();
((
Application
Activity
)
parentActivity
).
updateActionBar
();
((
Launch
Activity
)
parentActivity
).
updateActionBar
();
}
}
@Override
@Override
...
@@ -244,7 +244,7 @@ public class GroupCreateFinalActivity extends BaseFragment implements Notificati
...
@@ -244,7 +244,7 @@ public class GroupCreateFinalActivity extends BaseFragment implements Notificati
Bundle
bundle
=
new
Bundle
();
Bundle
bundle
=
new
Bundle
();
bundle
.
putInt
(
"chat_id"
,
(
Integer
)
args
[
0
]);
bundle
.
putInt
(
"chat_id"
,
(
Integer
)
args
[
0
]);
fragment
.
setArguments
(
bundle
);
fragment
.
setArguments
(
bundle
);
((
Application
Activity
)
parentActivity
).
presentFragment
(
fragment
,
"chat"
+
Math
.
random
(),
true
,
false
);
((
Launch
Activity
)
parentActivity
).
presentFragment
(
fragment
,
"chat"
+
Math
.
random
(),
true
,
false
);
}
}
});
});
}
}
...
...
TMessagesProj/src/main/java/org/telegram/ui/IdenticonActivity.java
View file @
2518d0e9
...
@@ -111,8 +111,8 @@ public class IdenticonActivity extends BaseFragment {
...
@@ -111,8 +111,8 @@ public class IdenticonActivity extends BaseFragment {
if
(
getActivity
()
==
null
)
{
if
(
getActivity
()
==
null
)
{
return
;
return
;
}
}
((
Application
Activity
)
parentActivity
).
showActionBar
();
((
Launch
Activity
)
parentActivity
).
showActionBar
();
((
Application
Activity
)
parentActivity
).
updateActionBar
();
((
Launch
Activity
)
parentActivity
).
updateActionBar
();
fixLayout
();
fixLayout
();
}
}
...
...
TMessagesProj/src/main/java/org/telegram/ui/
Application
Activity.java
→
TMessagesProj/src/main/java/org/telegram/ui/
Launch
Activity.java
View file @
2518d0e9
...
@@ -51,7 +51,7 @@ import java.lang.reflect.Field;
...
@@ -51,7 +51,7 @@ import java.lang.reflect.Field;
import
java.lang.reflect.Method
;
import
java.lang.reflect.Method
;
import
java.util.ArrayList
;
import
java.util.ArrayList
;
public
class
Application
Activity
extends
ActionBarActivity
implements
NotificationCenter
.
NotificationCenterDelegate
,
MessagesActivity
.
MessagesActivityDelegate
{
public
class
Launch
Activity
extends
ActionBarActivity
implements
NotificationCenter
.
NotificationCenterDelegate
,
MessagesActivity
.
MessagesActivityDelegate
{
private
boolean
finished
=
false
;
private
boolean
finished
=
false
;
private
NotificationView
notificationView
;
private
NotificationView
notificationView
;
private
Uri
photoPath
=
null
;
private
Uri
photoPath
=
null
;
...
...
TMessagesProj/src/main/java/org/telegram/ui/LocationActivity.java
View file @
2518d0e9
...
@@ -207,8 +207,8 @@ public class LocationActivity extends BaseFragment implements NotificationCenter
...
@@ -207,8 +207,8 @@ public class LocationActivity extends BaseFragment implements NotificationCenter
if
(
getActivity
()
==
null
)
{
if
(
getActivity
()
==
null
)
{
return
;
return
;
}
}
((
Application
Activity
)
parentActivity
).
showActionBar
();
((
Launch
Activity
)
parentActivity
).
showActionBar
();
((
Application
Activity
)
parentActivity
).
updateActionBar
();
((
Launch
Activity
)
parentActivity
).
updateActionBar
();
}
}
@Override
@Override
...
...
TMessagesProj/src/main/java/org/telegram/ui/LoginActivity.java
View file @
2518d0e9
...
@@ -239,7 +239,7 @@ public class LoginActivity extends ActionBarActivity implements SlideView.SlideV
...
@@ -239,7 +239,7 @@ public class LoginActivity extends ActionBarActivity implements SlideView.SlideV
@Override
@Override
public
void
needFinishActivity
()
{
public
void
needFinishActivity
()
{
Intent
intent2
=
new
Intent
(
this
,
Application
Activity
.
class
);
Intent
intent2
=
new
Intent
(
this
,
Launch
Activity
.
class
);
startActivity
(
intent2
);
startActivity
(
intent2
);
finish
();
finish
();
}
}
...
...
TMessagesProj/src/main/java/org/telegram/ui/MediaActivity.java
View file @
2518d0e9
...
@@ -271,8 +271,8 @@ public class MediaActivity extends BaseFragment implements NotificationCenter.No
...
@@ -271,8 +271,8 @@ public class MediaActivity extends BaseFragment implements NotificationCenter.No
listAdapter
.
notifyDataSetChanged
();
listAdapter
.
notifyDataSetChanged
();
}
}
firstStart
=
false
;
firstStart
=
false
;
((
Application
Activity
)
parentActivity
).
showActionBar
();
((
Launch
Activity
)
parentActivity
).
showActionBar
();
((
Application
Activity
)
parentActivity
).
updateActionBar
();
((
Launch
Activity
)
parentActivity
).
updateActionBar
();
fixLayout
();
fixLayout
();
}
}
...
...
TMessagesProj/src/main/java/org/telegram/ui/MessagesActivity.java
View file @
2518d0e9
...
@@ -193,17 +193,17 @@ public class MessagesActivity extends BaseFragment implements NotificationCenter
...
@@ -193,17 +193,17 @@ public class MessagesActivity extends BaseFragment implements NotificationCenter
if
(
lower_part
>
0
)
{
if
(
lower_part
>
0
)
{
bundle
.
putInt
(
"user_id"
,
lower_part
);
bundle
.
putInt
(
"user_id"
,
lower_part
);
fragment
.
setArguments
(
bundle
);
fragment
.
setArguments
(
bundle
);
((
Application
Activity
)
parentActivity
).
presentFragment
(
fragment
,
"chat"
+
Math
.
random
(),
false
);
((
Launch
Activity
)
parentActivity
).
presentFragment
(
fragment
,
"chat"
+
Math
.
random
(),
false
);
}
else
if
(
lower_part
<
0
)
{
}
else
if
(
lower_part
<
0
)
{
bundle
.
putInt
(
"chat_id"
,
-
lower_part
);
bundle
.
putInt
(
"chat_id"
,
-
lower_part
);
fragment
.
setArguments
(
bundle
);
fragment
.
setArguments
(
bundle
);
((
Application
Activity
)
parentActivity
).
presentFragment
(
fragment
,
"chat"
+
Math
.
random
(),
false
);
((
Launch
Activity
)
parentActivity
).
presentFragment
(
fragment
,
"chat"
+
Math
.
random
(),
false
);
}
}
}
else
{
}
else
{
int
id
=
(
int
)(
dialog_id
>>
32
);
int
id
=
(
int
)(
dialog_id
>>
32
);
bundle
.
putInt
(
"enc_id"
,
id
);
bundle
.
putInt
(
"enc_id"
,
id
);
fragment
.
setArguments
(
bundle
);
fragment
.
setArguments
(
bundle
);
((
Application
Activity
)
parentActivity
).
presentFragment
(
fragment
,
"chat"
+
Math
.
random
(),
false
);
((
Launch
Activity
)
parentActivity
).
presentFragment
(
fragment
,
"chat"
+
Math
.
random
(),
false
);
}
}
}
}
}
}
...
@@ -306,7 +306,7 @@ public class MessagesActivity extends BaseFragment implements NotificationCenter
...
@@ -306,7 +306,7 @@ public class MessagesActivity extends BaseFragment implements NotificationCenter
actionBar
.
setSubtitle
(
null
);
actionBar
.
setSubtitle
(
null
);
actionBar
.
setCustomView
(
null
);
actionBar
.
setCustomView
(
null
);
actionBar
.
setTitle
(
getStringEntry
(
R
.
string
.
SelectChat
));
actionBar
.
setTitle
(
getStringEntry
(
R
.
string
.
SelectChat
));
((
Application
Activity
)
parentActivity
).
fixBackButton
();
((
Launch
Activity
)
parentActivity
).
fixBackButton
();
}
else
{
}
else
{
ImageView
view
=
(
ImageView
)
parentActivity
.
findViewById
(
16908332
);
ImageView
view
=
(
ImageView
)
parentActivity
.
findViewById
(
16908332
);
if
(
view
==
null
)
{
if
(
view
==
null
)
{
...
@@ -349,8 +349,8 @@ public class MessagesActivity extends BaseFragment implements NotificationCenter
...
@@ -349,8 +349,8 @@ public class MessagesActivity extends BaseFragment implements NotificationCenter
if
(
messagesListViewAdapter
!=
null
)
{
if
(
messagesListViewAdapter
!=
null
)
{
messagesListViewAdapter
.
notifyDataSetChanged
();
messagesListViewAdapter
.
notifyDataSetChanged
();
}
}
((
Application
Activity
)
parentActivity
).
showActionBar
();
((
Launch
Activity
)
parentActivity
).
showActionBar
();
((
Application
Activity
)
parentActivity
).
updateActionBar
();
((
Launch
Activity
)
parentActivity
).
updateActionBar
();
}
}
@Override
@Override
...
@@ -607,7 +607,7 @@ public class MessagesActivity extends BaseFragment implements NotificationCenter
...
@@ -607,7 +607,7 @@ public class MessagesActivity extends BaseFragment implements NotificationCenter
messagesListViewAdapter
.
notifyDataSetChanged
();
messagesListViewAdapter
.
notifyDataSetChanged
();
}
}
if
(
onlySelect
)
{
if
(
onlySelect
)
{
((
Application
Activity
)
parentActivity
).
fixBackButton
();
((
Launch
Activity
)
parentActivity
).
fixBackButton
();
}
}
return
true
;
return
true
;
}
}
...
@@ -629,11 +629,11 @@ public class MessagesActivity extends BaseFragment implements NotificationCenter
...
@@ -629,11 +629,11 @@ public class MessagesActivity extends BaseFragment implements NotificationCenter
switch
(
itemId
)
{
switch
(
itemId
)
{
case
R
.
id
.
messages_list_menu_settings
:
{
case
R
.
id
.
messages_list_menu_settings
:
{
((
Application
Activity
)
inflaterActivity
).
presentFragment
(
new
SettingsActivity
(),
"settings"
,
false
);
((
Launch
Activity
)
inflaterActivity
).
presentFragment
(
new
SettingsActivity
(),
"settings"
,
false
);
break
;
break
;
}
}
case
R
.
id
.
messages_list_menu_contacts
:
{
case
R
.
id
.
messages_list_menu_contacts
:
{
((
Application
Activity
)
inflaterActivity
).
presentFragment
(
new
ContactsActivity
(),
"contacts"
,
false
);
((
Launch
Activity
)
inflaterActivity
).
presentFragment
(
new
ContactsActivity
(),
"contacts"
,
false
);
break
;
break
;
}
}
case
R
.
id
.
messages_list_menu_new_messages
:
{
case
R
.
id
.
messages_list_menu_new_messages
:
{
...
@@ -644,7 +644,7 @@ public class MessagesActivity extends BaseFragment implements NotificationCenter
...
@@ -644,7 +644,7 @@ public class MessagesActivity extends BaseFragment implements NotificationCenter
bundle
.
putBoolean
(
"usersAsSections"
,
true
);
bundle
.
putBoolean
(
"usersAsSections"
,
true
);
fragment
.
animationType
=
1
;
fragment
.
animationType
=
1
;
fragment
.
setArguments
(
bundle
);
fragment
.
setArguments
(
bundle
);
((
Application
Activity
)
inflaterActivity
).
presentFragment
(
fragment
,
"contacts_chat"
,
false
);
((
Launch
Activity
)
inflaterActivity
).
presentFragment
(
fragment
,
"contacts_chat"
,
false
);
break
;
break
;
}
}
case
R
.
id
.
messages_list_menu_new_secret_chat
:
{
case
R
.
id
.
messages_list_menu_new_secret_chat
:
{
...
@@ -656,11 +656,11 @@ public class MessagesActivity extends BaseFragment implements NotificationCenter
...
@@ -656,11 +656,11 @@ public class MessagesActivity extends BaseFragment implements NotificationCenter
bundle
.
putBoolean
(
"createSecretChat"
,
true
);
bundle
.
putBoolean
(
"createSecretChat"
,
true
);
fragment
.
animationType
=
1
;
fragment
.
animationType
=
1
;
fragment
.
setArguments
(
bundle
);
fragment
.
setArguments
(
bundle
);
((
Application
Activity
)
inflaterActivity
).
presentFragment
(
fragment
,
"contacts_chat"
,
false
);
((
Launch
Activity
)
inflaterActivity
).
presentFragment
(
fragment
,
"contacts_chat"
,
false
);
break
;
break
;
}
}
case
R
.
id
.
messages_list_menu_new_chat
:
{
case
R
.
id
.
messages_list_menu_new_chat
:
{
((
Application
Activity
)
inflaterActivity
).
presentFragment
(
new
GroupCreateActivity
(),
"group_create"
,
false
);
((
Launch
Activity
)
inflaterActivity
).
presentFragment
(
new
GroupCreateActivity
(),
"group_create"
,
false
);
break
;
break
;
}
}
case
android
.
R
.
id
.
home
:
case
android
.
R
.
id
.
home
:
...
...
TMessagesProj/src/main/java/org/telegram/ui/PhotoCropActivity.java
View file @
2518d0e9
...
@@ -380,6 +380,6 @@ public class PhotoCropActivity extends BaseFragment {
...
@@ -380,6 +380,6 @@ public class PhotoCropActivity extends BaseFragment {
if
(
getActivity
()
==
null
)
{
if
(
getActivity
()
==
null
)
{
return
;
return
;
}
}
((
Application
Activity
)
parentActivity
).
updateActionBar
();
((
Launch
Activity
)
parentActivity
).
updateActionBar
();
}
}
}
}
TMessagesProj/src/main/java/org/telegram/ui/SettingsActivity.java
View file @
2518d0e9
...
@@ -223,11 +223,11 @@ public class SettingsActivity extends BaseFragment implements NotificationCenter
...
@@ -223,11 +223,11 @@ public class SettingsActivity extends BaseFragment implements NotificationCenter
listView
.
invalidateViews
();
listView
.
invalidateViews
();
}
}
}
else
if
(
i
==
notificationRow
)
{
}
else
if
(
i
==
notificationRow
)
{
((
Application
Activity
)
parentActivity
).
presentFragment
(
new
SettingsNotificationsActivity
(),
"settings_notifications"
,
false
);
((
Launch
Activity
)
parentActivity
).
presentFragment
(
new
SettingsNotificationsActivity
(),
"settings_notifications"
,
false
);
}
else
if
(
i
==
blockedRow
)
{
}
else
if
(
i
==
blockedRow
)
{
((
Application
Activity
)
parentActivity
).
presentFragment
(
new
SettingsBlockedUsers
(),
"settings_blocked"
,
false
);
((
Launch
Activity
)
parentActivity
).
presentFragment
(
new
SettingsBlockedUsers
(),
"settings_blocked"
,
false
);
}
else
if
(
i
==
backgroundRow
)
{
}
else
if
(
i
==
backgroundRow
)
{
((
Application
Activity
)
parentActivity
).
presentFragment
(
new
SettingsWallpapersActivity
(),
"settings_wallpapers"
,
false
);
((
Launch
Activity
)
parentActivity
).
presentFragment
(
new
SettingsWallpapersActivity
(),
"settings_wallpapers"
,
false
);
}
else
if
(
i
==
askQuestionRow
)
{
}
else
if
(
i
==
askQuestionRow
)
{
final
SharedPreferences
preferences
=
ApplicationLoader
.
applicationContext
.
getSharedPreferences
(
"mainconfig"
,
Activity
.
MODE_PRIVATE
);
final
SharedPreferences
preferences
=
ApplicationLoader
.
applicationContext
.
getSharedPreferences
(
"mainconfig"
,
Activity
.
MODE_PRIVATE
);
int
uid
=
preferences
.
getInt
(
"support_id"
,
0
);
int
uid
=
preferences
.
getInt
(
"support_id"
,
0
);
...
@@ -286,7 +286,7 @@ public class SettingsActivity extends BaseFragment implements NotificationCenter
...
@@ -286,7 +286,7 @@ public class SettingsActivity extends BaseFragment implements NotificationCenter
Bundle
bundle
=
new
Bundle
();
Bundle
bundle
=
new
Bundle
();
bundle
.
putInt
(
"user_id"
,
res
.
user
.
id
);
bundle
.
putInt
(
"user_id"
,
res
.
user
.
id
);
fragment
.
setArguments
(
bundle
);
fragment
.
setArguments
(
bundle
);
((
Application
Activity
)
parentActivity
).
presentFragment
(
fragment
,
"chat"
+
Math
.
random
(),
false
);
((
Launch
Activity
)
parentActivity
).
presentFragment
(
fragment
,
"chat"
+
Math
.
random
(),
false
);
}
}
});
});
}
else
{
}
else
{
...
@@ -309,7 +309,7 @@ public class SettingsActivity extends BaseFragment implements NotificationCenter
...
@@ -309,7 +309,7 @@ public class SettingsActivity extends BaseFragment implements NotificationCenter
Bundle
bundle
=
new
Bundle
();
Bundle
bundle
=
new
Bundle
();
bundle
.
putInt
(
"user_id"
,
supportUser
.
id
);
bundle
.
putInt
(
"user_id"
,
supportUser
.
id
);
fragment
.
setArguments
(
bundle
);
fragment
.
setArguments
(
bundle
);
((
Application
Activity
)
parentActivity
).
presentFragment
(
fragment
,
"chat"
+
Math
.
random
(),
false
);
((
Launch
Activity
)
parentActivity
).
presentFragment
(
fragment
,
"chat"
+
Math
.
random
(),
false
);
}
}
}
else
if
(
i
==
sendLogsRow
)
{
}
else
if
(
i
==
sendLogsRow
)
{
sendLogs
();
sendLogs
();
...
@@ -478,8 +478,8 @@ public class SettingsActivity extends BaseFragment implements NotificationCenter
...
@@ -478,8 +478,8 @@ public class SettingsActivity extends BaseFragment implements NotificationCenter
listAdapter
.
notifyDataSetChanged
();
listAdapter
.
notifyDataSetChanged
();
}
}
firstStart
=
false
;
firstStart
=
false
;
((
Application
Activity
)
parentActivity
).
showActionBar
();
((
Launch
Activity
)
parentActivity
).
showActionBar
();
((
Application
Activity
)
parentActivity
).
updateActionBar
();
((
Launch
Activity
)
parentActivity
).
updateActionBar
();
}
}
@Override
@Override
...
@@ -544,7 +544,7 @@ public class SettingsActivity extends BaseFragment implements NotificationCenter
...
@@ -544,7 +544,7 @@ public class SettingsActivity extends BaseFragment implements NotificationCenter
button
.
setOnClickListener
(
new
View
.
OnClickListener
()
{
button
.
setOnClickListener
(
new
View
.
OnClickListener
()
{
@Override
@Override
public
void
onClick
(
View
view
)
{
public
void
onClick
(
View
view
)
{
((
Application
Activity
)
parentActivity
).
presentFragment
(
new
SettingsChangeNameActivity
(),
"change_name"
,
false
);
((
Launch
Activity
)
parentActivity
).
presentFragment
(
new
SettingsChangeNameActivity
(),
"change_name"
,
false
);
}
}
});
});
...
...
TMessagesProj/src/main/java/org/telegram/ui/SettingsBlockedUsers.java
View file @
2518d0e9
...
@@ -95,7 +95,7 @@ public class SettingsBlockedUsers extends BaseFragment implements NotificationCe
...
@@ -95,7 +95,7 @@ public class SettingsBlockedUsers extends BaseFragment implements NotificationCe
Bundle
args
=
new
Bundle
();
Bundle
args
=
new
Bundle
();
args
.
putInt
(
"user_id"
,
blockedContacts
.
get
(
i
).
user_id
);
args
.
putInt
(
"user_id"
,
blockedContacts
.
get
(
i
).
user_id
);
fragment
.
setArguments
(
args
);
fragment
.
setArguments
(
args
);
((
Application
Activity
)
parentActivity
).
presentFragment
(
fragment
,
"user_"
+
blockedContacts
.
get
(
i
).
user_id
,
false
);
((
Launch
Activity
)
parentActivity
).
presentFragment
(
fragment
,
"user_"
+
blockedContacts
.
get
(
i
).
user_id
,
false
);
}
}
}
}
});
});
...
@@ -269,7 +269,7 @@ public class SettingsBlockedUsers extends BaseFragment implements NotificationCe
...
@@ -269,7 +269,7 @@ public class SettingsBlockedUsers extends BaseFragment implements NotificationCe
title
.
setCompoundDrawablesWithIntrinsicBounds
(
0
,
0
,
0
,
0
);
title
.
setCompoundDrawablesWithIntrinsicBounds
(
0
,
0
,
0
,
0
);
title
.
setCompoundDrawablePadding
(
0
);
title
.
setCompoundDrawablePadding
(
0
);
}
}
((
Application
Activity
)
parentActivity
).
fixBackButton
();
((
Launch
Activity
)
parentActivity
).
fixBackButton
();
}
}
@Override
@Override
...
@@ -285,8 +285,8 @@ public class SettingsBlockedUsers extends BaseFragment implements NotificationCe
...
@@ -285,8 +285,8 @@ public class SettingsBlockedUsers extends BaseFragment implements NotificationCe
listViewAdapter
.
notifyDataSetChanged
();
listViewAdapter
.
notifyDataSetChanged
();
}
}
firstStart
=
false
;
firstStart
=
false
;
((
Application
Activity
)
parentActivity
).
showActionBar
();
((
Launch
Activity
)
parentActivity
).
showActionBar
();
((
Application
Activity
)
parentActivity
).
updateActionBar
();
((
Launch
Activity
)
parentActivity
).
updateActionBar
();
}
}
public
void
onCreateOptionsMenu
(
Menu
menu
,
MenuInflater
inflater
)
{
public
void
onCreateOptionsMenu
(
Menu
menu
,
MenuInflater
inflater
)
{
...
@@ -310,7 +310,7 @@ public class SettingsBlockedUsers extends BaseFragment implements NotificationCe
...
@@ -310,7 +310,7 @@ public class SettingsBlockedUsers extends BaseFragment implements NotificationCe
bundle
.
putBoolean
(
"returnAsResult"
,
true
);
bundle
.
putBoolean
(
"returnAsResult"
,
true
);
fragment
.
delegate
=
this
;
fragment
.
delegate
=
this
;
fragment
.
setArguments
(
bundle
);
fragment
.
setArguments
(
bundle
);
((
Application
Activity
)
parentActivity
).
presentFragment
(
fragment
,
"contacts_block"
,
false
);
((
Launch
Activity
)
parentActivity
).
presentFragment
(
fragment
,
"contacts_block"
,
false
);
break
;
break
;
}
}
return
true
;
return
true
;
...
...
TMessagesProj/src/main/java/org/telegram/ui/SettingsNotificationsActivity.java
View file @
2518d0e9
...
@@ -292,8 +292,8 @@ public class SettingsNotificationsActivity extends BaseFragment {
...
@@ -292,8 +292,8 @@ public class SettingsNotificationsActivity extends BaseFragment {
if
(
getActivity
()
==
null
)
{
if
(
getActivity
()
==
null
)
{
return
;
return
;
}
}
((
Application
Activity
)
parentActivity
).
showActionBar
();
((
Launch
Activity
)
parentActivity
).
showActionBar
();
((
Application
Activity
)
parentActivity
).
updateActionBar
();
((
Launch
Activity
)
parentActivity
).
updateActionBar
();
}
}
@Override
@Override
...
...
TMessagesProj/src/main/java/org/telegram/ui/SettingsWallpapersActivity.java
View file @
2518d0e9
...
@@ -424,7 +424,7 @@ public class SettingsWallpapersActivity extends BaseFragment implements Notifica
...
@@ -424,7 +424,7 @@ public class SettingsWallpapersActivity extends BaseFragment implements Notifica
listAdapter
.
notifyDataSetChanged
();
listAdapter
.
notifyDataSetChanged
();
}
}
((
Application
Activity
)
parentActivity
).
hideActionBar
();
((
Launch
Activity
)
parentActivity
).
hideActionBar
();
processSelectedBackground
();
processSelectedBackground
();
...
...
TMessagesProj/src/main/java/org/telegram/ui/UserProfileActivity.java
View file @
2518d0e9
...
@@ -178,13 +178,13 @@ public class UserProfileActivity extends BaseFragment implements NotificationCen
...
@@ -178,13 +178,13 @@ public class UserProfileActivity extends BaseFragment implements NotificationCen
bundle
.
putLong
(
"dialog_id"
,
user_id
);
bundle
.
putLong
(
"dialog_id"
,
user_id
);
}
}
fragment
.
setArguments
(
bundle
);
fragment
.
setArguments
(
bundle
);
((
Application
Activity
)
parentActivity
).
presentFragment
(
fragment
,
"media_user_"
+
user_id
,
false
);
((
Launch
Activity
)
parentActivity
).
presentFragment
(
fragment
,
"media_user_"
+
user_id
,
false
);
}
else
if
(
i
==
5
&&
dialog_id
!=
0
&&
currentEncryptedChat
instanceof
TLRPC
.
TL_encryptedChat
)
{
}
else
if
(
i
==
5
&&
dialog_id
!=
0
&&
currentEncryptedChat
instanceof
TLRPC
.
TL_encryptedChat
)
{
IdenticonActivity
fragment
=
new
IdenticonActivity
();
IdenticonActivity
fragment
=
new
IdenticonActivity
();
Bundle
bundle
=
new
Bundle
();
Bundle
bundle
=
new
Bundle
();
bundle
.
putInt
(
"chat_id"
,
(
int
)(
dialog_id
>>
32
));
bundle
.
putInt
(
"chat_id"
,
(
int
)(
dialog_id
>>
32
));
fragment
.
setArguments
(
bundle
);
fragment
.
setArguments
(
bundle
);
((
Application
Activity
)
parentActivity
).
presentFragment
(
fragment
,
"key_"
+
dialog_id
,
false
);
((
Launch
Activity
)
parentActivity
).
presentFragment
(
fragment
,
"key_"
+
dialog_id
,
false
);
}
else
if
(
i
==
4
&&
dialog_id
!=
0
&&
currentEncryptedChat
instanceof
TLRPC
.
TL_encryptedChat
)
{
}
else
if
(
i
==
4
&&
dialog_id
!=
0
&&
currentEncryptedChat
instanceof
TLRPC
.
TL_encryptedChat
)
{
AlertDialog
.
Builder
builder
=
new
AlertDialog
.
Builder
(
parentActivity
);
AlertDialog
.
Builder
builder
=
new
AlertDialog
.
Builder
(
parentActivity
);
builder
.
setTitle
(
getStringEntry
(
R
.
string
.
MessageLifetime
));
builder
.
setTitle
(
getStringEntry
(
R
.
string
.
MessageLifetime
));
...
@@ -312,7 +312,7 @@ public class UserProfileActivity extends BaseFragment implements NotificationCen
...
@@ -312,7 +312,7 @@ public class UserProfileActivity extends BaseFragment implements NotificationCen
Bundle
bundle
=
new
Bundle
();
Bundle
bundle
=
new
Bundle
();
bundle
.
putInt
(
"enc_id"
,
encryptedChat
.
id
);
bundle
.
putInt
(
"enc_id"
,
encryptedChat
.
id
);
fragment
.
setArguments
(
bundle
);
fragment
.
setArguments
(
bundle
);
((
Application
Activity
)
parentActivity
).
presentFragment
(
fragment
,
"chat"
+
Math
.
random
(),
true
,
false
);
((
Launch
Activity
)
parentActivity
).
presentFragment
(
fragment
,
"chat"
+
Math
.
random
(),
true
,
false
);
}
}
}
else
if
(
id
==
MessagesController
.
encryptedChatUpdated
)
{
}
else
if
(
id
==
MessagesController
.
encryptedChatUpdated
)
{
TLRPC
.
EncryptedChat
chat
=
(
TLRPC
.
EncryptedChat
)
args
[
0
];
TLRPC
.
EncryptedChat
chat
=
(
TLRPC
.
EncryptedChat
)
args
[
0
];
...
@@ -373,8 +373,8 @@ public class UserProfileActivity extends BaseFragment implements NotificationCen
...
@@ -373,8 +373,8 @@ public class UserProfileActivity extends BaseFragment implements NotificationCen
listAdapter
.
notifyDataSetChanged
();
listAdapter
.
notifyDataSetChanged
();
}
}
firstStart
=
false
;
firstStart
=
false
;
((
Application
Activity
)
parentActivity
).
showActionBar
();
((
Launch
Activity
)
parentActivity
).
showActionBar
();
((
Application
Activity
)
parentActivity
).
updateActionBar
();
((
Launch
Activity
)
parentActivity
).
updateActionBar
();
fixLayout
();
fixLayout
();
}
}
...
@@ -439,7 +439,7 @@ public class UserProfileActivity extends BaseFragment implements NotificationCen
...
@@ -439,7 +439,7 @@ public class UserProfileActivity extends BaseFragment implements NotificationCen
Bundle
args
=
new
Bundle
();
Bundle
args
=
new
Bundle
();
args
.
putInt
(
"user_id"
,
user
.
id
);
args
.
putInt
(
"user_id"
,
user
.
id
);
fragment
.
setArguments
(
args
);
fragment
.
setArguments
(
args
);
((
Application
Activity
)
parentActivity
).
presentFragment
(
fragment
,
"add_contact_"
+
user
.
id
,
false
);
((
Launch
Activity
)
parentActivity
).
presentFragment
(
fragment
,
"add_contact_"
+
user
.
id
,
false
);
break
;
break
;
}
}
case
R
.
id
.
share_contact
:
{
case
R
.
id
.
share_contact
:
{
...
@@ -449,7 +449,7 @@ public class UserProfileActivity extends BaseFragment implements NotificationCen
...
@@ -449,7 +449,7 @@ public class UserProfileActivity extends BaseFragment implements NotificationCen
args
.
putBoolean
(
"serverOnly"
,
true
);
args
.
putBoolean
(
"serverOnly"
,
true
);
fragment
.
setArguments
(
args
);
fragment
.
setArguments
(
args
);
fragment
.
delegate
=
this
;
fragment
.
delegate
=
this
;
((
Application
Activity
)
parentActivity
).
presentFragment
(
fragment
,
"chat_select"
,
false
);
((
Launch
Activity
)
parentActivity
).
presentFragment
(
fragment
,
"chat_select"
,
false
);
break
;
break
;
}
}
case
R
.
id
.
edit_contact
:
{
case
R
.
id
.
edit_contact
:
{
...
@@ -457,7 +457,7 @@ public class UserProfileActivity extends BaseFragment implements NotificationCen
...
@@ -457,7 +457,7 @@ public class UserProfileActivity extends BaseFragment implements NotificationCen
Bundle
args
=
new
Bundle
();
Bundle
args
=
new
Bundle
();
args
.
putInt
(
"user_id"
,
user_id
);
args
.
putInt
(
"user_id"
,
user_id
);
fragment
.
setArguments
(
args
);
fragment
.
setArguments
(
args
);
((
Application
Activity
)
parentActivity
).
presentFragment
(
fragment
,
"add_contact_"
+
user_id
,
false
);
((
Launch
Activity
)
parentActivity
).
presentFragment
(
fragment
,
"add_contact_"
+
user_id
,
false
);
break
;
break
;
}
}
case
R
.
id
.
delete_contact
:
{
case
R
.
id
.
delete_contact
:
{
...
@@ -513,7 +513,7 @@ public class UserProfileActivity extends BaseFragment implements NotificationCen
...
@@ -513,7 +513,7 @@ public class UserProfileActivity extends BaseFragment implements NotificationCen
bundle
.
putInt
(
"user_id"
,
lower_part
);
bundle
.
putInt
(
"user_id"
,
lower_part
);
fragment
.
setArguments
(
bundle
);
fragment
.
setArguments
(
bundle
);
fragment
.
scrollToTopOnResume
=
true
;
fragment
.
scrollToTopOnResume
=
true
;
((
Application
Activity
)
parentActivity
).
presentFragment
(
fragment
,
"chat"
+
Math
.
random
(),
true
,
false
);
((
Launch
Activity
)
parentActivity
).
presentFragment
(
fragment
,
"chat"
+
Math
.
random
(),
true
,
false
);
removeSelfFromStack
();
removeSelfFromStack
();
messageFragment
.
removeSelfFromStack
();
messageFragment
.
removeSelfFromStack
();
}
else
if
(
lower_part
<
0
)
{
}
else
if
(
lower_part
<
0
)
{
...
@@ -521,7 +521,7 @@ public class UserProfileActivity extends BaseFragment implements NotificationCen
...
@@ -521,7 +521,7 @@ public class UserProfileActivity extends BaseFragment implements NotificationCen
bundle
.
putInt
(
"chat_id"
,
-
lower_part
);
bundle
.
putInt
(
"chat_id"
,
-
lower_part
);
fragment
.
setArguments
(
bundle
);
fragment
.
setArguments
(
bundle
);
fragment
.
scrollToTopOnResume
=
true
;
fragment
.
scrollToTopOnResume
=
true
;
((
Application
Activity
)
parentActivity
).
presentFragment
(
fragment
,
"chat"
+
Math
.
random
(),
true
,
false
);
((
Launch
Activity
)
parentActivity
).
presentFragment
(
fragment
,
"chat"
+
Math
.
random
(),
true
,
false
);
messageFragment
.
removeSelfFromStack
();
messageFragment
.
removeSelfFromStack
();
removeSelfFromStack
();
removeSelfFromStack
();
}
}
...
@@ -531,7 +531,7 @@ public class UserProfileActivity extends BaseFragment implements NotificationCen
...
@@ -531,7 +531,7 @@ public class UserProfileActivity extends BaseFragment implements NotificationCen
bundle
.
putInt
(
"enc_id"
,
id
);
bundle
.
putInt
(
"enc_id"
,
id
);
fragment
.
setArguments
(
bundle
);
fragment
.
setArguments
(
bundle
);
fragment
.
scrollToTopOnResume
=
true
;
fragment
.
scrollToTopOnResume
=
true
;
((
Application
Activity
)
parentActivity
).
presentFragment
(
fragment
,
"chat"
+
Math
.
random
(),
false
);
((
Launch
Activity
)
parentActivity
).
presentFragment
(
fragment
,
"chat"
+
Math
.
random
(),
false
);
messageFragment
.
removeSelfFromStack
();
messageFragment
.
removeSelfFromStack
();
removeSelfFromStack
();
removeSelfFromStack
();
}
}
...
@@ -730,7 +730,7 @@ public class UserProfileActivity extends BaseFragment implements NotificationCen
...
@@ -730,7 +730,7 @@ public class UserProfileActivity extends BaseFragment implements NotificationCen
Bundle
bundle
=
new
Bundle
();
Bundle
bundle
=
new
Bundle
();
bundle
.
putInt
(
"user_id"
,
user_id
);
bundle
.
putInt
(
"user_id"
,
user_id
);
fragment
.
setArguments
(
bundle
);
fragment
.
setArguments
(
bundle
);
((
Application
Activity
)
parentActivity
).
presentFragment
(
fragment
,
"chat"
+
Math
.
random
(),
true
,
false
);
((
Launch
Activity
)
parentActivity
).
presentFragment
(
fragment
,
"chat"
+
Math
.
random
(),
true
,
false
);
}
}
});
});
TextView
textView
=
(
TextView
)
view
.
findViewById
(
R
.
id
.
settings_row_text
);
TextView
textView
=
(
TextView
)
view
.
findViewById
(
R
.
id
.
settings_row_text
);
...
...
TMessagesProj/src/main/java/org/telegram/ui/Views/AvatarUpdater.java
View file @
2518d0e9
...
@@ -21,7 +21,7 @@ import org.telegram.messenger.FileLog;
...
@@ -21,7 +21,7 @@ import org.telegram.messenger.FileLog;
import
org.telegram.messenger.NotificationCenter
;
import
org.telegram.messenger.NotificationCenter
;
import
org.telegram.messenger.UserConfig
;
import
org.telegram.messenger.UserConfig
;
import
org.telegram.messenger.Utilities
;
import
org.telegram.messenger.Utilities
;
import
org.telegram.ui.
Application
Activity
;
import
org.telegram.ui.
Launch
Activity
;
import
org.telegram.ui.PhotoCropActivity
;
import
org.telegram.ui.PhotoCropActivity
;
import
java.io.File
;
import
java.io.File
;
...
@@ -76,9 +76,9 @@ public class AvatarUpdater implements NotificationCenter.NotificationCenterDeleg
...
@@ -76,9 +76,9 @@ public class AvatarUpdater implements NotificationCenter.NotificationCenterDeleg
private
void
startCrop
(
String
path
,
Uri
uri
)
{
private
void
startCrop
(
String
path
,
Uri
uri
)
{
try
{
try
{
ApplicationActivity
activity
=
(
Application
Activity
)
parentFragment
.
parentActivity
;
LaunchActivity
activity
=
(
Launch
Activity
)
parentFragment
.
parentActivity
;
if
(
activity
==
null
)
{
if
(
activity
==
null
)
{
activity
=
(
Application
Activity
)
parentFragment
.
getActivity
();
activity
=
(
Launch
Activity
)
parentFragment
.
getActivity
();
}
}
if
(
activity
==
null
)
{
if
(
activity
==
null
)
{
return
;
return
;
...
...
TMessagesProj/src/main/java/org/telegram/ui/Views/BaseFragment.java
View file @
2518d0e9
...
@@ -17,7 +17,7 @@ import android.view.animation.Animation;
...
@@ -17,7 +17,7 @@ import android.view.animation.Animation;
import
android.view.animation.AnimationUtils
;
import
android.view.animation.AnimationUtils
;
import
org.telegram.messenger.ConnectionsManager
;
import
org.telegram.messenger.ConnectionsManager
;
import
org.telegram.ui.
Application
Activity
;
import
org.telegram.ui.
Launch
Activity
;
import
org.telegram.ui.ApplicationLoader
;
import
org.telegram.ui.ApplicationLoader
;
public
class
BaseFragment
extends
Fragment
{
public
class
BaseFragment
extends
Fragment
{
...
@@ -55,7 +55,7 @@ public class BaseFragment extends Fragment {
...
@@ -55,7 +55,7 @@ public class BaseFragment extends Fragment {
onFragmentDestroy
();
onFragmentDestroy
();
return
;
return
;
}
}
((
Application
Activity
)
parentActivity
).
finishFragment
(
bySwipe
);
((
Launch
Activity
)
parentActivity
).
finishFragment
(
bySwipe
);
if
(
getActivity
()
==
null
)
{
if
(
getActivity
()
==
null
)
{
if
(
fragmentView
!=
null
)
{
if
(
fragmentView
!=
null
)
{
ViewGroup
parent
=
(
ViewGroup
)
fragmentView
.
getParent
();
ViewGroup
parent
=
(
ViewGroup
)
fragmentView
.
getParent
();
...
@@ -80,7 +80,7 @@ public class BaseFragment extends Fragment {
...
@@ -80,7 +80,7 @@ public class BaseFragment extends Fragment {
onFragmentDestroy
();
onFragmentDestroy
();
return
;
return
;
}
}
((
Application
Activity
)
parentActivity
).
removeFromStack
(
this
);
((
Launch
Activity
)
parentActivity
).
removeFromStack
(
this
);
if
(
getActivity
()
==
null
)
{
if
(
getActivity
()
==
null
)
{
if
(
fragmentView
!=
null
)
{
if
(
fragmentView
!=
null
)
{
ViewGroup
parent
=
(
ViewGroup
)
fragmentView
.
getParent
();
ViewGroup
parent
=
(
ViewGroup
)
fragmentView
.
getParent
();
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment