Package io.rong.imkit.feature.destruct

## Class DestructManager

- All Implemented Interfaces:

      public class DestructManager

  Created by Android Studio. User: lvhongzhen Date: 2019-09-11 Time: 10:26

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class | Description
    --- | --- | ---

  - ### Field Summary

    Fields
    Modifier and Type | Field | Description
    --- | --- | ---
    `public static int` | `VOICE_DESTRUCT_TIME` |
    `public static int` | `IMAGE_DESTRUCT_TIME` |
    `public static int` | `SIGHT_DESTRUCT_TIME` |

  - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---

  - ### Enum Constant Summary

    Enum Constants
    Enum Constant | Description
    --- | ---

  - ### Method Summary

    Modifier and Type | Method | Description
    --- | --- | ---
    `static DestructManager` | `getInstance()` |
    `void` | `activeDestructMode(Context context)` | 激活阅后即焚模式
    `void` | `exitDestructMode()` |
    `static boolean` | `isActive()` |
    `void` | `onTextChanged(Context context, ConversationType type, String targetId, int cursorPos, int count, String text)` |
    `void` | `onSendToggleClick(Message message)` |
    `void` | `onDeleteClick(ConversationType type, String targetId, EditText editText, int cursorPos)` |
    `void` | `onDestroy(ConversationType type, String targetId)` |
    `void` | `addListener(String pUId, DestructCountDownTimerListener pDestructListener, String pTag)` |
    `void` | `deleteMessage(Message pMessage)` |
    `void` | `deleteMessages(ConversationType pConversationType, String pTargetId, Array<Message> pDeleteMessages)` |
    `String` | `getUnFinishTime(String pMessageId)` |
    `void` | `startDestruct(Message pMessage)` |
    `void` | `stopDestruct(Message pMessage)` |
    `void` | `safeAttacheToExtension(Fragment currentFragment, RongExtension extension)` | 如果弱引用出问题，重新attach

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

  - ### Method Detail

    - #### getInstance

           static DestructManager getInstance()

    - #### activeDestructMode

           void activeDestructMode(Context context)

      激活阅后即焚模式

    - #### exitDestructMode

           void exitDestructMode()

    - #### isActive

           static boolean isActive()

    - #### onTextChanged

           void onTextChanged(Context context, ConversationType type, String targetId, int cursorPos, int count, String text)

    - #### onSendToggleClick

           void onSendToggleClick(Message message)

    - #### onDeleteClick

           void onDeleteClick(ConversationType type, String targetId, EditText editText, int cursorPos)

    - #### onDestroy

           void onDestroy(ConversationType type, String targetId)

    - #### addListener

           void addListener(String pUId, DestructCountDownTimerListener pDestructListener, String pTag)

    - #### deleteMessage

           void deleteMessage(Message pMessage)

    - #### deleteMessages

           void deleteMessages(ConversationType pConversationType, String pTargetId, Array<Message> pDeleteMessages)

    - #### getUnFinishTime

           String getUnFinishTime(String pMessageId)

    - #### startDestruct

           void startDestruct(Message pMessage)

    - #### stopDestruct

           void stopDestruct(Message pMessage)

    - #### safeAttacheToExtension

           void safeAttacheToExtension(Fragment currentFragment, RongExtension extension)

      如果弱引用出问题，重新attach