Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/mogujie/TeamTalk
Browse files Browse the repository at this point in the history
  • Loading branch information
mgjdafo committed May 18, 2015
2 parents aae98d9 + b9ca8f5 commit dbe8ba6
Show file tree
Hide file tree
Showing 38 changed files with 363 additions and 208 deletions.
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,7 @@
TeamTalk is a solution for enterprise IM

具体文档见doc目录下,安装之前请仔细阅读相关文档。

# 交流
* qq群1:341273218(已满)
* qq群2:437335108(已满)
40 changes: 40 additions & 0 deletions android/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
# OSX
.DS_Store

# android generated
bin/
gen/

# eclipse
.classpath
.settings
.project

local.properties
project.properties

# IDEA
.idea/
*.iml
out/

# gradle
build/
.gradle/
gradle/
gradlew
gradlew.bat
gradle.properties

# build
lint.xml
lint.html
proguard-rules.txt
import-summary.txt

run.sh
com_crashlytics_export_strings.xml
crashlytics-build.properties

# test
test.html
13 changes: 0 additions & 13 deletions android/.idea/gradle.xml

This file was deleted.

4 changes: 4 additions & 0 deletions android/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
android TT编译环境要求
* IDE使用Android-studio
* java 1.7
* gradle 2.2.1
13 changes: 0 additions & 13 deletions android/app/app.iml

This file was deleted.

2 changes: 2 additions & 0 deletions android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ android {
applicationId "com.mogujie.tt"
minSdkVersion 11
targetSdkVersion 19
versionCode 5
versionName "2.0.0"
}

buildTypes {
Expand Down
7 changes: 1 addition & 6 deletions android/app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,11 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.mogujie.tt"
android:versionCode="5"
android:versionName="2.0.0" > <!-- 11 means android3 at least -->
<uses-sdk
android:minSdkVersion="11"
android:targetSdkVersion="19" />
package="com.mogujie.tt">

<uses-permission android:name="android.permission.MODIFY_AUDIO_SETTINGS" />
<uses-permission android:name="android.permission.RECORD_AUDIO" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ public class SystemConfigSp {

public static SystemConfigSp instance() {
if (systemConfigSp == null) {
synchronized (LoginSp.class) {
synchronized (SystemConfigSp.class) {
systemConfigSp = new SystemConfigSp();
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ public void onLocalNetOk(){

// 用户信息
int updateTime = dbInterface.getUserInfoLastTime();
logger.d("contact#loadAllUserInfo req-updateTime:%d",updateTime);
logger.d("contact#loadAllUserInfo req-updateTime:%d", updateTime);
reqGetAllUsers(updateTime);
}

Expand Down Expand Up @@ -131,7 +131,7 @@ private void reqGetAllUsers(int lastUpdateTime) {
.setLatestUpdateTime(lastUpdateTime).build();
int sid = IMBaseDefine.ServiceID.SID_BUDDY_LIST_VALUE;
int cid = IMBaseDefine.BuddyListCmdID.CID_BUDDY_LIST_ALL_USER_REQUEST_VALUE;
imSocketManager.sendRequest(imAllUserReq,sid,cid);
imSocketManager.sendRequest(imAllUserReq, sid, cid);
}

/**
Expand Down Expand Up @@ -198,7 +198,7 @@ public void reqGetDetaillUsers(ArrayList<Integer> userIds){

int sid = IMBaseDefine.ServiceID.SID_BUDDY_LIST_VALUE;
int cid = IMBaseDefine.BuddyListCmdID.CID_BUDDY_LIST_USER_INFO_REQUEST_VALUE;
imSocketManager.sendRequest(imUsersInfoReq,sid,cid);
imSocketManager.sendRequest(imUsersInfoReq, sid, cid);
}

/**
Expand Down Expand Up @@ -244,17 +244,15 @@ public DepartmentEntity findDepartment(int deptId){
public List<DepartmentEntity> getDepartmentSortedList(){
// todo eric efficiency
List<DepartmentEntity> departmentList = new ArrayList<>(departmentMap.values());
Collections.sort(departmentList, new Comparator<DepartmentEntity>(){
Collections.sort(departmentList, new Comparator<DepartmentEntity>() {
@Override
public int compare(DepartmentEntity entity1, DepartmentEntity entity2) {

if(entity1.getPinyinElement().pinyin==null)
{
PinYin.getPinYin(entity1.getDepartName(),entity1.getPinyinElement());
if (entity1.getPinyinElement().pinyin == null) {
PinYin.getPinYin(entity1.getDepartName(), entity1.getPinyinElement());
}
if(entity2.getPinyinElement().pinyin==null)
{
PinYin.getPinYin(entity2.getDepartName(),entity2.getPinyinElement());
if (entity2.getPinyinElement().pinyin == null) {
PinYin.getPinYin(entity2.getDepartName(), entity2.getPinyinElement());
}
return entity1.getPinyinElement().pinyin.compareToIgnoreCase(entity2.getPinyinElement().pinyin);

Expand Down Expand Up @@ -322,7 +320,13 @@ public int compare(UserEntity entity1, UserEntity entity2) {
}
// end compare
} else {
return dept1.getDepartName().compareToIgnoreCase(dept2.getDepartName());
if(dept1!=null && dept2!=null && dept1.getDepartName()!=null && dept2.getDepartName()!=null)
{
return dept1.getDepartName().compareToIgnoreCase(dept2.getDepartName());
}
else
return 1;

}
}
});
Expand Down
2 changes: 1 addition & 1 deletion android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ buildscript {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:1.0.1'
classpath 'com.android.tools.build:gradle:1.1.0'
}
}

Expand Down
1 change: 0 additions & 1 deletion android/daogenerator/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ apply plugin: 'java'
apply plugin: 'maven'
//apply plugin:'application'

//貌似没有什么用

repositories {
mavenLocal()
Expand Down
20 changes: 0 additions & 20 deletions android/daogenerator/daogenerator.iml

This file was deleted.

6 changes: 6 additions & 0 deletions android/mgimlibs/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ android {
defaultConfig {
minSdkVersion 8
targetSdkVersion 19
versionCode 5
versionName "2.0.0"
}

buildTypes {
Expand All @@ -19,6 +21,10 @@ android {
sourceCompatibility JavaVersion.VERSION_1_7
targetCompatibility JavaVersion.VERSION_1_7
}

lintOptions {
abortOnError false
}
}

dependencies {
Expand Down
13 changes: 0 additions & 13 deletions android/mgimlibs/mgimlibs.iml

This file was deleted.

8 changes: 1 addition & 7 deletions android/mgimlibs/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,12 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.mogujie.im.libs"
android:versionCode="1"
android:versionName="1.0" >

<uses-sdk
android:minSdkVersion="8"
android:targetSdkVersion="19" />
package="com.mogujie.im.libs">

<application>
</application>
Expand Down
4 changes: 2 additions & 2 deletions php/application/controllers/user.php
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ public function all()
public function del()
{
$id = $this->input->post('id');
$result = $this->user_model->update(array('status'=>1), $id);
$result = $this->user_model->update(array('status'=>3), $id);
if($result){
echo 'success';
}
Expand Down Expand Up @@ -200,4 +200,4 @@ public function _upload($filename)
return json_decode($result,1);
}

}
}
Loading

0 comments on commit dbe8ba6

Please sign in to comment.